user.js icon indicating copy to clipboard operation
user.js copied to clipboard

"browser.display.use_document_fonts", default fonts & uBo/uM icons [FFv55, Linux]

Open atomGit opened this issue 9 years ago • 26 comments

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

atomGit avatar Sep 20 '17 17:09 atomGit

browser.display.use_document_fonts = 0 I set fonts to Liberation (Sans, Serif) to unbreak uBo GUI FF 55.0.3 on Debian

2glops avatar Sep 20 '17 18:09 2glops

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?

atomGit avatar Sep 21 '17 16:09 atomGit

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.

earthlng avatar Sep 22 '17 11:09 earthlng

"could" because

it would be one more thing we would need to maintain and IDK if we want to do that.

but "does" if we decide to provide that.

earthlng avatar Sep 22 '17 12:09 earthlng

A simple scratchpad script ...

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?

atomGit avatar Sep 22 '17 12:09 atomGit

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

atomGit avatar Sep 22 '17 13:09 atomGit

We could add a new wiki page for bulk clearing via scratchpad - sample would include non-existant pref names

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.

earthlng avatar Sep 22 '17 13:09 earthlng

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);

earthlng avatar Sep 22 '17 13:09 earthlng

http://pasted.co/059329d0/fullscreen.php?hash=fc7c9889db6ebacd661900f5afc0d4be&toolbar=true&linenum=false

earthlng avatar Sep 22 '17 13:09 earthlng

139 inactive prefs in user.js

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

~~since peeps will have the script to refer to, in user.js i think you could remove 9999: DEPRECATED (maybe just link the script there) and shorten the file~~ <-- NOT a good idea

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

atomGit avatar Sep 22 '17 14:09 atomGit

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 <img> tags xD deal?

earthlng avatar Sep 22 '17 14:09 earthlng

@earthlng - i get an error when running your script (modified to include all this, with commas in the right places and some cleanup)...

Exception: ReferenceError: Services is not defined @Scratchpad/1:220:5 @Scratchpad/1:1:2

this is referencing...

for (let i=0, len=ops.length; i < len; i++) { Services.prefs.clearUserPref(ops[i]); }

atomGit avatar Sep 22 '17 14:09 atomGit

open about:config (so that Services is available for scratchpad) then press Shift+F4, paste the script and run it.

(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.

earthlng avatar Sep 22 '17 14:09 earthlng

well I'm willing to do this if and when you finally find the time to upload the pics for your uBlock/uMatrix article to your own server ...

already got much of that done - i've been updating the article and replacing as i go

atomGit avatar Sep 22 '17 14:09 atomGit

open about:config (so that Services is available ...

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)

atomGit avatar Sep 22 '17 15:09 atomGit

is there any feedback when you run a script? i

never mind - i checked a pref and the script is indeed working

atomGit avatar Sep 22 '17 15:09 atomGit

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)

earthlng avatar Sep 22 '17 15:09 earthlng

does it include all inactive since you guys started?

all the prefs we removed from the user.js are missing in that list

earthlng avatar Sep 22 '17 15:09 earthlng

Would it not be better to have the parrot change at the end?

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.

earthlng avatar Sep 22 '17 15:09 earthlng

clearUserPref() doesn't return anything so it's not possible to add meaningful checks or counts.

scratch that. prefHasUserValue() can be used as a check (+count). see updated code sample

earthlng avatar Sep 22 '17 15:09 earthlng