Closed Bug 1090503 Opened 10 years ago Closed 7 years ago

Modularise prefs.js to keep add-on preferences out of the main file

Categories

(Core :: Preferences: Backend, enhancement)

33 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: a.eibach, Unassigned)

Details

This is just another idea (or if you insist, a RfC) to make Firefox better and "de-clutter" its main configuration file. That's about time, I reckon. Do you have NoScript installed? You do? So you might have taken a look how your prefs.js file is cluttered up with enormously looooooong lines after the 'user_pref("capability.policy.maonoscript.sites"' statements. My idea is loosely based on how aptitude does it in Linux: /etc/apt/sources.list.d/ misterx-gparted-trusty.list mistery-gnome3-staging-utopic.list misterz-pcmanfm-testing-vivid.list In human-readable words: it splits its sources lists per (e. g.) PPA and avoids to have everything chucked in one file, so that the lists can separately be worked on, if needed. This is what I've thought prefs.js could do as well: e. g. # Mozilla User Preferences /* Do not edit this file. * * If you make changes to this file while the application is running, * the changes will be overwritten when the application exits. * * To make a manual change to preferences, you can visit the URL about:config */ user_pref_include("noscript.pref") user_pref_include("yourfavaddon.pref") user_pref("accessibility.browsewithcaret_shortcut.enabled", false); user_pref("accessibility.typeaheadfind.flashBar", 0); user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1414517562); ... So, big pref lists (like those from NoScript) could be moved to their own file and INCLUDED by the main file, similarly to require() in PHP. The NoScript author would simply have to check whether the new syntax is supported (version check?) and if yes, create/update a "noscript.pref" and, if not already there, user_pref_include() the line into prefs.js. All this would make prefs.js more readable and maintainable, for instance if you made a big mistake you cannot fix via about:config but have to edit the file yourself. Your thoughts please.
Severity: minor → enhancement
Component: Preferences → Preferences: Backend
Product: Firefox → Core
Since FF57, extensions can no longer use prefs. So I don't think this is worthwhile.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.