mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2025-12-06 02:30:54 -08:00
Doc: Preference - Update autoconfig contents
This commit is contained in:
parent
5ad1750b05
commit
da738749e5
1 changed files with 20 additions and 4 deletions
|
|
@ -146,16 +146,32 @@ Customizations that cannot be done with add-on and [`User Custom CSS`](./README.
|
||||||
- [Bug 1432901 - Prototype loading ES6 Module as JSM](https://bugzilla.mozilla.org/show_bug.cgi?id=1432901)
|
- [Bug 1432901 - Prototype loading ES6 Module as JSM](https://bugzilla.mozilla.org/show_bug.cgi?id=1432901)
|
||||||
|
|
||||||
**How to**
|
**How to**
|
||||||
|
- `<FIREFOX_DIR>/defaults/pref/autoconfig.js`
|
||||||
```javascript
|
```javascript
|
||||||
pref("general.config.filename", "config.js"); // alternative to "firefox.cfg", for using highlight
|
pref("general.config.filename", "config.js"); // alternative to "firefox.cfg", for using highlight
|
||||||
pref("general.config.obscure_value", 0);
|
pref("general.config.obscure_value", 0);
|
||||||
|
pref("general.config.sandbox_enabled", false); // Sandbox needs to be disabled in release and Beta versions
|
||||||
|
```
|
||||||
|
|
||||||
|
- `<FIREFOX_DIR>/config.js`
|
||||||
|
```javascript
|
||||||
|
// skip 1st line
|
||||||
|
try {
|
||||||
|
const cmanifest = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('UChrm', Ci.nsIFile);
|
||||||
|
cmanifest.append('utils');
|
||||||
|
cmanifest.append('chrome.manifest');
|
||||||
|
|
||||||
|
if(cmanifest.exists()){
|
||||||
|
Components.manager.QueryInterface(Ci.nsIComponentRegistrar).autoRegister(cmanifest);
|
||||||
|
ChromeUtils.import('chrome://userchromejs/content/boot.jsm');
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch(ex) {};
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```javascript
|
- [MrOtherGuy/fx-autoconfig](https://github.com/MrOtherGuy/fx-autoconfig)
|
||||||
pref("general.config.filename", "config.js"); // alternative to "firefox.cfg", for using highlight
|
- [xiaoxiaoflood/firefox-scripts](https://github.com/xiaoxiaoflood/firefox-scripts)
|
||||||
pref("general.config.obscure_value", 0);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Using with User Custom CSS
|
## Using with User Custom CSS
|
||||||
**Related Docs**
|
**Related Docs**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue