Fix #1572: flip pref to make FF look for userChrome

This commit is contained in:
Oliver Blanthorn 2019-05-29 17:06:38 +01:00
parent cef4c3f5d2
commit 06b013b38e
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -360,6 +360,7 @@ export async function guiset_quiet(rule: string, option: string) {
// Check for native messenger and make sure we have a plausible profile directory
if (!(await Native.nativegate("0.1.1"))) return
const profile_dir = await Native.getProfileDir()
await setpref("toolkit.legacyUserProfileCustomizations.stylesheets", "true")
// Make backups
await Native.mkdir(profile_dir + "/chrome", true)
@ -381,6 +382,8 @@ export async function guiset_quiet(rule: string, option: string) {
*
* Might mangle your userChrome. Requires native messenger, and you must restart Firefox each time to see any changes (this can be done using [[restart]]). <!-- (unless you enable addon debugging and refresh using the browser toolbox) -->
*
* Also flips the preference `toolkit.legacyUserProfileCustomizations.stylesheets` to true so that FF will read your userChrome.
*
* View available rules and options [here](/static/docs/modules/_src_lib_css_util_.html#potentialrules) and [here](/static/docs/modules/_src_lib_css_util_.html#metarules).
*
* Example usage: `guiset gui none`, `guiset gui full`, `guiset tabs autohide`.