mirror of
https://github.com/yokoffing/Betterfox.git
synced 2026-06-12 15:40:48 +05:30
Updated How to understand a user.js file (markdown)
@@ -10,30 +10,30 @@ Every line that sets a preference follows this format:
|
||||
|
||||
Let's unpack that:
|
||||
|
||||
* `user_pref`: This is just a command that tells Firefox, "Hey, I want to set a user preference." You'll see this at the start of almost every active line.
|
||||
* `user_pref`: A command that tells Firefox, "Hey, I want to set a user preference." You'll see this at the start of almost every active line.
|
||||
* `("preference.name.here", value)`: This part is enclosed in parentheses.
|
||||
* `"preference.name.here"`: This is the **name** of the Firefox setting you want to change. It's always a string of text, wrapped in double quotes. These names can look a bit like website addresses, with dots separating different parts. For example, `browser.startup.homepage` tells Firefox what page to load when it starts.
|
||||
* `"preference.name.here"`: The **name** of the Firefox setting you want to change. It's always a string of text, wrapped in double quotes. These names can look a bit like website addresses, with dots separating different parts. For example, `browser.startup.homepage` tells Firefox what page to load when it starts.
|
||||
* `,`: A comma separates the preference name from its value.
|
||||
* `value`: This is what you want to set the preference **to**. The type of value depends on the preference (see next section).
|
||||
* `;`: Each `user_pref` line **must end with a semicolon**. This tells Firefox that the instruction is complete. Forgetting this is a common mistake!
|
||||
* `value`: What you want to set the preference **to**. The type of value depends on the preference (see next section).
|
||||
* `;`: Each `user_pref` line **must end with a semicolon**. This tells Firefox that the instruction is complete.
|
||||
|
||||
### Types of Values
|
||||
|
||||
There are three main types of values you'll use:
|
||||
|
||||
1. **Boolean (True/False):**
|
||||
* This is for settings that are either on or off.
|
||||
* Designate as either on or off.
|
||||
* You'll use `true` (to turn it on) or `false` (to turn it off).
|
||||
* **Example:** `user_pref("browser.tabs.warnOnClose", false);` (This tells Firefox *not* to warn you when you close multiple tabs.)
|
||||
* **Important:** Don't put quotes around `true` or `false`. They are keywords, not text strings in this case.
|
||||
|
||||
2. **Integer (Numbers):**
|
||||
* This is for settings that require a whole number.
|
||||
* Require a whole number.
|
||||
* **Example:** `user_pref("network.http.max-persistent-connections-per-server", 6);` (This sets the maximum number of connections to a server to 6.)
|
||||
* **Important:** Just use the number. No quotes.
|
||||
|
||||
3. **String (Text):**
|
||||
* This is for settings that require text, like a URL or a file path.
|
||||
* Require text, like a URL or a file path.
|
||||
* Strings **must be enclosed in double quotes**.
|
||||
* **Example:** `user_pref("browser.startup.homepage", "https://www.duckduckgo.com");` (This sets your homepage to DuckDuckGo.)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user