aminomancer / uc.css.js

A dark indigo CSS theme for Firefox and a large collection of privileged scripts to add new buttons, menus, and behaviors and eliminate nuisances. The theme is similar to other userChrome stylesheets, but it's intended for use with an autoconfig loader like fx-autoconfig, since it uses JavaScript to implement its more functional features.
Other
326 stars 27 forks source link

[BUG]clearDownloadsButton.uc.js console error #78

Closed hansemn closed 1 year ago

hansemn commented 1 year ago

Describe the bug clearDownloadsButton.uc.js causes an error in browser console

To Reproduce Steps to reproduce the behavior:

  1. Install clearDownloadsButton.uc.js 1.4.2
  2. run Firefox
  3. open browser console
  4. error: Uncaught ReferenceError: gBrowserInit is not defined

Expected behavior No error

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

The scripts works great regardless, just thought I'd mention the error in browser console.

It's not tested in Nightly, which I can't use anymore due to a recently unsupported OS, but that bit of code (gBrowserInit )has been in the script for a while, and might in general be deprecated.

Thanks very much for your contributions, much appreciated!

error

aminomancer commented 1 year ago

Just FYI, the scripts on this repo only support Nightly, sorry :/ I would recommend downloading the repo from before June, so you get the scripts that were compatible with 115. Going forward, you probably won't be able to use new and updated scripts here, as they are all based on 118+.

You should also do the same with your script loader. I can only attest to my scripts' compatibility with fx-autoconfig. So, here's fx-autoconfig at the time of 115.

Anyway, gBrowserInit is not deprecated.

It sounds like your issue is with your script loader. 1.4.2 of the script should still work in 115. If gBrowserInit doesn't exist when the script executes, it means your script loader is loading scripts too late, or perhaps it's not loading scripts in the chrome window at all.

Judging by the console log (Firefox.app/Contents/Resources/userChromeJS/utilties.js), you're not using a compatible script loader. So, you should look to your script loader for problems, or switch to fx-autoconfig.

There's a lot more info about all of this in the readme. It also covers basic requirements like the fact that this repo only supports Nightly and fx-autoconfig 😅

hansemn commented 1 year ago

Thanks a lot for the reply, I'll look into my loader. This is what I'm using - it's in German I'm afraid: link.

Your script is still working fine though, so no sweat. ;)

aminomancer commented 1 year ago

Oh that's weird, from the console error I would have assumed the whole script broke