user.js: override.js file no longer overriding user.js file in FF58+
edit: 1413413 is the cause - Thorin
edit II: I submitted a bug report report (1416279) to hopefully address this - overdodactyl
edit III: bug was labeled WONTFIX
The code that implements this functionality has been removed. After sending an intent to remove email to dev.platform and discussing, we decided that it wasn’t worth the effort of continuing to support as we re-implement the preference service.
edit IV: wiki link
Greetings,
In the past, I’ve been using an override.js
file to override some preferences from user.js
as suggested in Section 1.5 of the wiki.
Sometime within the past week (maybe two?), the settings in my override.js file are no longer being used to override the user.js file in Firefox Nightly.
I can reproduce this issue in a new Nightly profile, however, if I copy my user.js file and my preferences folder containing override.js to a new profile and use the stable version of Firefox, I do not experience this issue.
Has something changed? Can anyone else confirm they are experiencing this in Nightly (or, alternatively, that they aren’t having the problem)?
I apologize if this has already been addressed…I did a quick search here and on bugzilla and couldn’t find anything relevant .
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 35 (35 by maintainers)
Commits related to this issue
- update to v2.0 https://github.com/ghacksuserjs/ghacks-user.js/issues/264#issuecomment-345462158 - It can now handle read-only files. - it is somewhat more explicit regarding what it's doing in so... — committed to arkenfox/user.js by earthlng 7 years ago
- updater.sh - next attempt ... at fixing the script path detection. should hopefully fix https://github.com/ghacksuserjs/ghacks-user.js/issues/264#issuecomment-346891526 — committed to arkenfox/user.js by earthlng 7 years ago
- updater.sh - next attempt ... at fixing the script path detection. should hopefully fix #264 (comment) — committed to arkenfox/user.js by earthlng 7 years ago
- update to v2.0 https://github.com/ghacksuserjs/ghacks-user.js/issues/264#issuecomment-345462158 - It can now handle read-only files. - it is somewhat more explicit regarding what it's doing in so... — committed to nachoparker/firefox-ownyourbits-user.js by earthlng 7 years ago
- updater.sh - next attempt ... at fixing the script path detection. should hopefully fix https://github.com/ghacksuserjs/ghacks-user.js/issues/264#issuecomment-346891526 — committed to nachoparker/firefox-ownyourbits-user.js by earthlng 7 years ago
- update to v2.0 https://github.com/ghacksuserjs/ghacks-user.js/issues/264#issuecomment-345462158 - It can now handle read-only files. - it is somewhat more explicit regarding what it's doing in so... — committed to PatrickMcKenzier/user.js by earthlng 7 years ago
- updater.sh - next attempt ... at fixing the script path detection. should hopefully fix https://github.com/ghacksuserjs/ghacks-user.js/issues/264#issuecomment-346891526 — committed to PatrickMcKenzier/user.js by earthlng 7 years ago
I made myself
this batch script(link removed) for Windows. I leave it here in case anyone wants it.It backs up user.js and then it downloads the user.js file from this repository and appends user-overrides.js to it.
It goes in the profile folder alongside user.js and user-overrides.js.
Thank you for this great resource, by the way. I’ve been using user.js files for a long time but this one is by far the most comprehensive I ever had.
Also thank you @overdodactyl for the heads up.
https://github.com/ghacksuserjs/ghacks-user.js/blob/master/updater.bat https://github.com/ghacksuserjs/ghacks-user.js/blob/master/updater.sh
This will help users a lot, thanks guys!!
Hi @earthlng
It’s the least I could do given how much I’ve benefited from this project 😃
@Thorin-Oakenpants
I decided to try and make a version of @claustromaniac’s script usable for fellow Mac users out there . I tried to incorporate all your suggestions from his first version, but I made this before I saw the most recent one. Feel free to use it, make any suggestions/change it however you like or completely ignore it all together. I’m pretty new to writing scripts, so this was a fun use of my time either way 😃
I gave up trying to fix the missing !s and ^s, I just can’t get it to work. For user_pref lines in override files there are easy workarounds to keep the lines un-merged, fe by prepending a
/* don't merge this */
or simply a TAB. We can mention that in the wiki. Pants and I just have to remember not to use those characters in comments behind user_pref lines.@overdodactyl For your own good, do not try to catch up. It’s too late for me, but you can still run away. Do it while you still can, before you begin the quick descent into madness.
My words exactly and now I’m stuck here xD Anyway, thanks a lot for contributing
@Thorin-Oakenpants I must admit that I also thought about compiling an exe, but that would bring along the hassle of dependencies and such, right? I mean, for a cross-platform approach we would need something like Python. It would be nice if someone could test @overdodactyl’s script on Linux, though. Since it’s not overly complex it might just work fine on many distros.
@earthlng Good catch. I wouldn’t hope for Firefox to be expecting some people using
user.js
files made out of chunks of text with different encoding, so I guess we’re indeed better off just avoiding that 😆 It’s good to know that it seems it’s just the BOM header that is leaving trash in the resulting file.@earthlng, I’m glad I could contribute a bit (even if it was something small)!
Thanks for cleaning up my code a bit, that was my first script of any real value over a couple lines, so I figured it was far from perfect 😃
I noticed in some of my profiles, the script wasn’t locating to the correct directory before running.
I changed
cd "
dirname $0"
tocd "$( dirname "${BASH_SOURCE[0]}" )" && pwd
and it seemed to work, but I can’t completely explain why…On a totally unrelated note, I noticed there was a comma missing on line 25 after
'media.webspeech.recognition.enable'
in the script for bulk resetting preferences. (thought it was worth pointing out but not worthy of it’s own issue 😃 )edit: my bad, fixed the comma - thorin
I tested the Windows batch script and noticed that I got this 1 weird line (

) in the concatenated user.js due to the BOM header because my user-overrides.js was stored as UTF-8. IDK if that’s a problem when FF will parse the file and/or whethercat
on Mac/Linux will also create that line when the 2 files are not in the same encoding. Just something to keep in mind I guess and maybe something that we should add a note about somewhere because some people might use UTF-8 because of foreign language comments in their user-overrides.js. The raw user.js on github is 1252 ANSI latin-1 encoded. Users either need to use ANSI encoding or UTF-8 without the BOM for their user-overrides.js file.Awesome stuff guys!! Thanks @claustromaniac + @overdodactyl ! ❤️
nits: In the mac (+linux?) version you’re downloading the file twice (not that it matters - just sayin’ 😃 and in certain places it would be better to use
&&
to make sure the previous command succeeded. I would also store the backup filename in a variable so that you can show the actual filename:Hi @overdodactyl
you found a problem, informed us about it, reported it to mozilla and provided a script that can be used as a workaround - what more could we ask for! Thanks for taking the time to do all that, much appreciated! ❤️❤️❤️