-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_ucUtils.updateStyleSheet() doesn't work #34
Comments
Hmm... I don't know what could be going wrong there. Your script seems to work correctly on Windows, and I don't have any mac system to test it with. The scenarios where that return
I suspect it's the last one, but it's just a guess. Your best option would be to use browser toolbox to add a breakpoint inside |
Thanks for the reply. How would I exactly add a breakpoint to the function? If it also helps, _ucUtils.updateStyleSheet("userChrome.au.css","author") and _ucUtils.updateStyleSheet("userChrome.ag.css","agent") works with the pre-installed stylesheets but not with my created stylesheet. My userchrome.css is a CSS file that is currently empty. |
Handling of userChrome.css is totally different than any author or agent styles. First, make sure you have named the file |
I did just that, and I still get false. Even though |
I'm not sure if this helps, but I have been trying alternate methods to reload the I have the 64-bit of Firefox 116.0.2 on a M2 Mac. Right now, I'm not sure if there's a problem with the scripts I'm using or a problem with my installation of Firefox. Thanks. |
I don't know how things worked four years ago, but nowadays at least userChrome.css is not loaded via style sheet service. I don't really know, but I think the script you linked would register it on top of the already existing style and you would end up in situation where you have both the old and new versions being loaded simultaneously - which I would imagine isn't healthy. I still think your best hope is to use the browser toolbox debugger. It works just like website devtools debugger. Just find |
Thanks for your response! I did what you said, and I think the issue is the following line:
The variable
Edit 1: I think I know why it fails.
However, the href attribute of my
The space I think resolving these two would fix the overall issue. Edit 2: I did a temporary fix by modifying the code slightly, and it works! This was indeed the issue, and now |
Good findings, great work! This is actually fixed in my development version already because the update function doesn't use that manually constructed |
So, if the issue here is what I think it is, then the latest version should work fine - provided that I have not broken something else. |
Hello. I just installed the manager, and I can confirm that it works since the console log message for test.uc.js gets printed in the browser console. However, _ucUtils.updateStyleSheet() doesn't seem to be working all since it keeps returning false even though I have a userChrome.css folder inside the chrome folder. I also tried placing a copy in the resources folder, but I still get false. I even tried _ucUtils.updateStyleSheet("userChrome.css"), but I get false as well.
The script I want to run that uses this function is
Testing gets printed, but _ucUtils.updateStyleSheet() doesn't do anything. How can I make the function recognize my userChrome.css? Also, does the function automatically reload userContent.css as well?
If it helps, my OS is a mac, and my Firefox version is 116. Thanks.
The text was updated successfully, but these errors were encountered: