-
Notifications
You must be signed in to change notification settings - Fork 519
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
"browser.display.use_document_fonts", default fonts & uBo/uM icons [FFv55, Linux] #238
Comments
browser.display.use_document_fonts = 0 |
i couldn't get the uBO or uM icons to appear by changing fonts - i tried about every reasonable font i had installed and started with a fresh prefs.js - so i'm leaving the option for sites to choose their own fonts enabled (this is on Linux btw) on another note (and i'll open a new ticket depending on feedback) ... when the user.js is updated, there can be old sections that are commented out, depreciated stuff, etc. - i'm wondering about how to handle removing/resetting the affected prefs in prefs.js - i'm wondering if you guys could create a batch script with all the old/commented prefs that would run on prefs.js to remove the clutter? |
A simple scratchpad script could do the job: (function() {
let ops = [
/* deprecated/removed in FF55 */
'browser.formautofill.enabled',
'browser.formfill.saveHttpsForms',
'browser.fullscreen.animate',
'browser.newtabpage.directory.ping',
'browser.selfsupport.enabled',
'browser.selfsupport.url',
'browser.tabs.animate',
'dom.enable_user_timing',
'dom.keyboardevent.code.enabled',
'geo.security.allowinsecure'
]
for (let i=0, len=ops.length; i < len; i++) {
if (Services.prefs.prefHasUserValue(ops[i])) {
Services.prefs.clearUserPref(ops[i]);
if (!Services.prefs.prefHasUserValue(ops[i])) { console.log("reset", ops[i]); }
}
}
})(); open about:config (so that Services is available for scratchpad) then press Shift+F4, paste the script and run it. We could add every pref we either removed, commented out or deprecated/removed since 52-alpha to the ops array. But it would be one more thing we would need to maintain and IDK if we want to do that. |
"could" because
but "does" if we decide to provide that. |
that's a damn good idea i might be willing to maintain the script, the problem is that you guys do a lot of releases, sometimes multiple releases a day, and i don't have the time for that if i updated the script once a week (oe so), would that work? i'm not sure how i'd get a list of prefs though unless i parsed every version of user.js since the last time i updated the script - i'm not into that either is there maybe a GitHub repo tool that could run a RegEx on ALL of the released user.js files that could help? or could all of them be downloaded at once? |
well, i'd like the depreciated ones too just to cut the garbage in prefs that could be misleading to someone trying to troubleshoot - i think a RegEx run against every release could be used, the ? is; how to d/l or access in one place every version of user.js |
that would be pretty nonsensical because people would need to check our changelogs for the relevant prefs and add them to the script and that would probably end up taking longer than just resetting each one in about:config. |
you don't need to include all the inactive prefs, only the ones we made inactive since the last release. "commented out" output from my script for the next changelog: //user_pref("device.sensors.enabled", false);
//user_pref("dom.gamepad.enabled", false);
//user_pref("dom.indexedDB.enabled", false);
//user_pref("dom.presentation.controller.enabled", false);
//user_pref("dom.presentation.discoverable", false);
//user_pref("dom.presentation.discovery.enabled", false);
//user_pref("dom.presentation.enabled", false);
//user_pref("dom.presentation.receiver.enabled", false);
//user_pref("dom.presentation.session_transport.data_channel.enable", false);
//user_pref("dom.vr.enabled", false);
//user_pref("dom.w3c_touch_events.enabled", 0);
//user_pref("font.name.monospace.x-unicode", "Lucida Console");
//user_pref("font.name.monospace.x-western", "Lucida Console");
//user_pref("font.name.sans-serif.x-unicode", "Arial");
//user_pref("font.name.sans-serif.x-western", "Arial");
//user_pref("font.name.serif.x-unicode", "Georgia");
//user_pref("font.name.serif.x-western", "Georgia");
//user_pref("media.mediasource.enabled", false); // previously active with value: true
//user_pref("media.mediasource.mp4.enabled", false); // previously active with value: true
//user_pref("media.mediasource.webm.audio.enabled", false); // previously active with value: true
//user_pref("media.mediasource.webm.enabled", false); // previously active with value: true
//user_pref("security.ssl3.dhe_rsa_aes_128_sha", false);
//user_pref("security.ssl3.dhe_rsa_aes_256_sha", false);
//user_pref("security.ssl3.ecdhe_ecdsa_aes_128_sha", false);
//user_pref("security.ssl3.ecdhe_rsa_aes_128_sha", false);
//user_pref("security.ssl3.rsa_des_ede3_sha", false); |
is that a running list? does it include all inactive since you guys started? if so, this will be easier than i thought an idea: i'll maintain the list/script - i can do this in the wiki, or you could put it in the repo alongside user.js and i'll make pull requests you guys point users to the script in user.js and wherever else is appropriate
might be best to have 2 scratchpad scripts? 1 for depreciated and 1 for inactive? or 1 script that is commented to indicated what's what as pants says, people need to be sure they add custom prefs at the end so they don't lose and settings from removed inactive prefs i like this/your ideas guys - i, and certainly others i'm sure, would like to make updating user.js as quick and hassle-free as possible and resetting prefs in about:config isn't an option IMHO |
well I'm willing to do this if and when you finally find the time to upload the pics for your blogpost to your own server and update all the |
@earthlng - i get an error when running your script (modified to include all this, with commas in the right places and some cleanup)...
this is referencing...
|
(by default) scratchpad scripts run within the environment of the currently active tab so you need to make sure that about:config is the active tab. |
already got much of that done - i've been updating the article and replacing as i go |
lol - i guess it helps to actually READ the directions :) is there any feedback when you run a script? i clicked 'run' and nothing appears to happen (about:config was active tab) |
never mind - i checked a pref and the script is indeed working |
clearUserPref() doesn't return anything so it's not possible to add meaningful checks or counts. If nothing appears to happen it worked. That's why I think we should include the _user.js.parrot in the list, to make it easy to spot if the script worked or not (because it's the first pref in about:config) |
all the prefs we removed from the user.js are missing in that list |
doesn't really matter, but sure, why not. I wanted to include a non-existent pref at the end anyway to make it easier for people to remove blocks they don't want to reset and not have to worry about the commas, but the parrot at the end would work too. |
scratch that. prefHasUserValue() can be used as a check (+count). see updated code sample |
so this is what i came up with as an example... /*
NAME: Scratchpad prefs.js cleanup script
VERSION: ?
AUTHOR/MAINTAINER: the ghacks boys and atomGit
This is a Firefox Scratchpad cleanup script intended to reset all depreciated and unused preferences from your prefs.js file.
The purpose of running this script is to cleanup your prefs.js file after you update your user.js file with a newer ghacks version in order to remove bloat and thus potentially help you when troubleshooting a problem. Running this script each time you update your user.js avoids having to manually reset preference values, thus making updating your user.js a bit less painful.
The source of the depreciated preferences is Mozilla while the source of the unused preferences is the ghacks user.js files. After resetting the preference values, all of the depreciated preferences will be removed from your prefs.js file upon restarting Firefox. The values for the unused preferences will be emptied in your prefs.js file.
WARNING: If you have set the values of any preferences in this list but have not copied them to your user.js, then those preference values will be lost.
How to run this script:
1) BACKUP YOUR CURENT FIREFOX PROFILE - you have been warned :)
2) Copy this script
3) Open about:config in Firefox
4) Press Shift + F4 to open Scratchpad
5) Press Ctrl + A and then Ctrl + V to paste the script in Scratchpad
6) Click the "Run" button on Scratchpad (there will be no indication that it ran, but there should be a log message appended to the script if there was a problem)
7) Restart Firefox
*/
(function() {
let ops = [
'accessibility.typeaheadfind',
'app.update.enabled',
[content removed for brevity]
'security.tls.unrestricted_rc4_fallback',
'toolkit.telemetry.unifiedIsOptIn'
]
for (let i=0, len=ops.length; i < len; i++) {
if (Services.prefs.prefHasUserValue(ops[i])) {
Services.prefs.clearUserPref(ops[i]);
if (!Services.prefs.prefHasUserValue(ops[i])) { console.log("reset", ops[i]); }
}
}
})(); assuming you guys really want to do this, given i'll maintain it, then i got a Q: how can comments be added within the list? i want to identify and separate depreciated and unused if you think it's a good idea UPDATE - added @earthlng code to display feedback |
I don't like the idea to reset every single pref in the user.js, it's unnecessary. We already have "commented out", "removed from the user.js" and "moved to deprecated" sections in the changelogs and that covers everything we need to include in the reset-script. It also allows for commented blocks in the script and can therefore also be useful for ESR users.
|
@earthlng "see my pasty" - got it - thanks (at first i couldn't open that link when you first posted it - sorry) @Thorin-Oakenpants re: resetting ALL prefs - not sure if you're referring to user or prefs, but either way, i would humbly agree with earthing now, for something a bit different... could the process of updating the user.js and the cleaning of prefs.js (equivalent to running the Scratchpad script) be totally automated by, say, a GM script that would prompt first and show a changelog perhaps? |
no, you're not right - i am because i'm perfect ... well, there was this ONE time i THOUGHT i was wrong, but i was wrong :) i get what you're saying and i realize it shouldn't break anything as long as the user appended changes rather than editing user.js (and if not, well, tough cookies) so yeah, i don't care, but i'd like you guys to argue about more cause i like watching you fight ... and i really don't feel qualified to make that decesion what about the GM thingy to automate the entire process? |
i ran it - seems to work but i'm still not seeing any feedback in the web or browser console i'll have more feedback regarding the wiki and stuff shortly... |
fresh, dedicated issue for the scratch-script discussion here |
after installing FFv55, i noticed the icons at the top of both uMatrix (1.0.0) and uBlock O (1.14.8) are mangled/missing - i found the cause to be
"browser.display.use_document_fonts" = 0
setting that to '1' solves the issue
this was apparently an old problem, but i'm wondering if it's resurfaced with v55?
related:
test: browser.display.use_document_fonts · Issue #126 · ghacksuserjs/ghacks-user.js
Firefox 41: Mozilla modifies how icon fonts are handled by the browser - gHacks Tech News
The text was updated successfully, but these errors were encountered: