Notice: To Install styles, click the "Show Css Code" button first. The install button will work after that.

Extension is broken

TypeError: browsers[i].contentDocument is undefined[Learn More] common.js:74:10
focusWindow chrome://stylish/content/common.js:74:10
openEdit chrome://stylish/content/common.js:92:7
openEditForId chrome://stylish/content/common.js:118:10
openEdit chrome://stylish/content/addon.xbl:15:6
oncommand about:addons:1:1

Comments

  • What version of Stylish, what version of Firefox, what page is (not) being styled?

    FYI, Stylish for Firefox may not run correctly or at all in Firefox Nightly 57 even with legacy extension support enabled.
  • Latest stable versions of both Fx and Stylish. I can't open a style to edit.
  • Try restoring this preference to default values:
    extensions.stylish.editorWindowPersist
  • Tried. That didn't solve anything.
  • Is this issue being ignored?
  • Drugoy said:

    Is this issue being ignored?

    Apparently, yes. Since the new owners took over Stylish, tech support appears to be diminished, at least for Firefox users.

    If you can't find an add-on conflict or some other explanation for why you have this issue (but other people responding to this thread do not), then...

    You may want to migrate your web page styles to a different extension such as Stylus. However, Stylus doesn't do UI styling.

    https://addons.mozilla.org/en-US/firefox/addon/styl-us/
  • I just figured out that stylish has been abandoned for more than a year. I guess it's time to migrate to Stylus.
  • There's an exporter for the legacy Stylish which can be loaded as a temporary addon to extract the DB to an importable format for Stylus. Never tried it personally, but I haven't seen anyone complaining about it lately, so that's a good sign.

    https://github.com/openstyles/firefox-stylish-export
  • Here's another extractor for the stylish.sqlite database:

    https://www.jeffersonscher.com/res/stylishextract.html (page uses a 2MB script file)

    To use it, open your currently active profile folder ( https://support.mozilla.org/kb/profiles-where-firefox-stores-user-data ), resize the window so you can see the gray drop-zone on the extractor web page, and drag and drop stylish.sqlite onto it. The rest should be self-explanatory.

    If anyone tests it, let me know if you run into any problems.
  • Jefferson, thank you, it worked just fine.
    However, turns out Stylus doesn't support styling the browser's chrome part [probably due to webextension limitations] which makes it a useless piece of... software.
    So, we are doomed.
  • Drugoy said:

    Stylus doesn't support styling the browser's chrome part [probably due to webextension limitations] ... So, we are doomed.

    Are you already using Nightly? Most UI-targeted style rules work in a userChrome.css file.

    There are some exceptions, related to timing issues, and userChrome.css does not allow AGENT SHEET which is an override Stylish allows that is needed to override !important rules in Firefox's built-in style sheets (as far as I know, the main example is scrollbar styling).
  • This style from stylish won't work in Stylus for me, nothing happens. Anyone know a fix?

  • Stylus is a WebExtension (new Mozilla addon format) which has certain limitations compared to the old XUL format. Because of that you cannot style the browser itself with Stylus.
    From Firefox version 57 there will only be WebExtensions allowed. So it won't work with Stylish either unless Mozilla provides a new API to style the browser with WebExtensions.
  • Chad_i said:

    This style from stylish won't work in Stylus for me, nothing happens. Anyone know a fix?

    Most user styles with the xul namespace can be applied to Firefox's UI using a userChrome.css file. It's way less convenient than Stylish has been, but...

    More info to get you started: https://support.mozilla.org/questions/1170342#answer-993956 (skip down to the bolded heading "For the userChrome.css method:").
  • edited February 2018 Firefox
    TypeError: browsers[i].contentDocument is undefined[Learn More] common.js:74:10 focusWindow chrome://stylish/content/common.js:74:10 openEdit chrome://stylish/content/common.js:92:7 openEditForId chrome://stylish/content/common.js:118:10 openEdit chrome://stylish/content/addon.xbl:15:6 oncommand about:addons:1:1

    Almost certainly an extension conflict.

    Using Stylish 2.1.1 with Waterfox 56.0.4_4 on FreeBSD-CURRENT, I have:

    • with a heavily extended profile, a problem similar to the one shown above
    • with a test profile that's extended with Stylish alone, no problem.

    A workaround of sorts:

    • about:stylish-edit

    In my case, a click on Write new style produces this in the browser console:

    TypeError: browsers[i].contentDocument is undefined[Learn More]  common.js:74:10
        focusWindow chrome://stylish/content/common.js:74:10
        openEdit chrome://stylish/content/common.js:92:7
        addCode chrome://stylish/content/common.js:324:3
        openAdd chrome://stylish/content/manage-addons.js:54:3
        oncommand about:addons:1:1
    

    If you'd like to compare your environment with mine:

Sign In or Register to comment.