Local Files

edited March 2008 in Stylish
While experimenting I noticed Stylish dont work on local files (the urls start with file:///). Does Stylish not support for local files or am I doing something wrong?
Thanks in advance.

Comments

  • edited March 2008
    Yes, stylish supports local files. The following should work:
    url("file:///C:/directory/folder/image.jpg")
    or
    Put your image in C:\Program Files\Mozilla\Firefox\res\
    And use the following code:
    url("resource://gre/res/image.jpg")
  • shouldnt that be resource:/res/image.jpg?
  • Both of the following work for me:
    url("resource://gre/res/image.jpg"
    url("resource:///res/image.jpg"
  • is there a chance to read pictures from a zip-file in the Firefox profile folder?

    I used to have an app supporting skins for a certain page. The way it was programmed (not by me) was disable since Firefox 2.0.0.9 or so.
    It worked with userContent.css and bindigs.css/.xml etc.
    All images and files are stored in a zip-file and read from there.
    So my question is if I can use stylish to get access to the images in the zip-file?
  • Posted By: ChoGGishouldnt that be resource:/res/image.jpg?
    Nope.
    Posted By: TJDabis there a chance to read pictures from a zip-file in the Firefox profile folder?
    Mozilla addons (extensions) are in standard .zip files which are renamed to .xpi, the same as most of the browser itself being in Java archives, which are .zip renamed to .jar (mostly). So, yes it should be possible. It may not be as easy as renaming the file, though. You could find out how to create an extension/addon which does nothing to the browser, but exposes your .xpi to Firefox on the chrome:// path. You'd end up with chrome://yournamehere/etc.png

    More simply, you need a way (Firefox's extension capability, or an extension written to do this?) that maps the .zip to some url scheme that Firefox can then access on-the-fly.
  • Thank you all. I fixed the problem...
  • Posted By: whatrevolution
    Posted By: ChoGGishouldnt that be resource:/res/image.jpg?
    Nope.
    What? It works.
  • I see. resource:/res/ did not work for me a few Firefox minor versions ago. I specifically remember being irritated at it.

    There's no problem now; you're right it does work. resource://gre/ , is the Firefox program folder.
Sign In or Register to comment.