Closed e-t-l closed 3 years ago
That suggests that you already have one autoconfig based loader. boot.jsm seems to be loading, userChrome.jsm from somewhere - that somewhere is defined in chrome.manifest but it's probably somewhere inside the "chrome" folder.
Nonetheless, you should definitely NOT use both this and your existing loader at the same time. So if you want to use this one, then remove the old one. My loader loads the individual .js scripts from a /chrome/JS folder, so yes you must create that or modify (my) boot.jsm to load the scripts from somewhere else if you plan on loading any .js scripts.
You don't strictly speaking need to copy the resources
folder, it exists purely to create "standard" folder where custom scripts can store their resource files like images for example.
Thanks. I realized I forgot to include the contents of chrome.manifest
so I updated my initial comment.
Based on what you're seeing here, does it look like I should just be able to drop a script with .uc.js
filetype in my chrome
folder and it should run?
I don't know. In your current setup it goes like this:
I don't know what that something is, so I can't tell where it looks for those .uc.js
files (or some other files?) if it even loads any files.
Now, my loader does basically the same thing, except that it combines boot.jsm and userChrome.jsm into same file. And I can tell you that my loader does NOT load .uc.js
files from chrome
folder. It loads them from chrome/JS
folder.
Thanks, I appreciate all your help. I did some digging and realized years ago I'd installed a script from https://github.com/xiaoxiaoflood/firefox-scripts/ that's responsible for this. I know I've been asking you to troubleshoot someone else's code, and I appreciate your patience. If I have trouble with scripts in the future, I'll go make noise in their issues section (or maybe I'll just delete their autoconfig and switch to yours instead).
@MrOtherGuy I decided to replace xiaoxiaoflood's loader with yours, and I'm just wondering, what purpose do userChrome_as_css.uc.js
and userChrome_as_css_module.uc.js
serve? I couldn't find any explanation in the Readme or commented in the files themselves.
They are example script files that don't have any visible effect on their own. They try to register new stylesheet from file userChrome.as.css
which would be loaded from the location where userChrome.css is. If the file doesn't exist they don't do anything except log an error to say the file could not be loaded.
Now that you mention it though, it would be better if they don't try to load the same file. And also, I should write a comment into both to explain what they do.
If you are wondering why to load such a file in the first place, well userChrome.css is loaded as user style sheet. But there are some things you can't do with user style sheet, so they exist as a way to load new style sheet as agent style sheet.
That makes sense, thank you!
So, FYI, I made a few changes to those example files. There is now two separate .uc.js files. The first one loads userChrome.ag.css
and the other userChrome.au.css
. These are now loaded from the chrome/resources/
folder, not the main chrome folder.
I already have a
config.js
in the Program folder and achrome
folder in the Firefox root folder.chrome
doesn't have any subdirectories, but it does already contain achrome.manifest
andboot.jsm
(as well as aUserChrome.css
that I have been actively using to tweak css). I don't particularly remember adding theconfig.js
orboot.jsm
, so in order to install this Fx Autoconfig, do I need to replace or append the code in the existing files? And do I need to add the folder structure that's missing (i.e.JS
,resources
, andutils
)?The contents of my existing files are below, so you can hopefully advise whether they need to be merged/replaced or whether they'll function as-is:
config.js
boot.jsm
chrome.manifest