mirror of
https://github.com/yokoffing/Betterfox.git
synced 2026-06-28 15:41:46 +05:30
Compare commits
8 Commits
main
..
c47779f6b9
| Author | SHA1 | Date | |
|---|---|---|---|
| c47779f6b9 | |||
| 46387cc042 | |||
| 7d4e1eb6ea | |||
| 99258db4a9 | |||
| aa8ad98105 | |||
| 97736d53d2 | |||
| 76392e72fe | |||
| de7fb78058 |
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: yokoffing
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: yokoffing
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: yokoffing
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
+25
-27
@@ -3,7 +3,7 @@
|
||||
* Fastfox *
|
||||
* "Non ducor duco" *
|
||||
* priority: speedy browsing *
|
||||
* version: 150 *
|
||||
* version: 152 *
|
||||
* url: https://github.com/yokoffing/Betterfox *
|
||||
***************************************************************************************/
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// Increases font cache size to improve performance on text-heavy websites.
|
||||
// Especially beneficial for sites with many font faces or complex typography.
|
||||
// [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1239151#c2
|
||||
//user_pref("gfx.content.skia-font-cache-size", 32); // 32 MB; default=5; Chrome=20
|
||||
user_pref("gfx.content.skia-font-cache-size", 20); // 20 MB; default=5; Chrome=20
|
||||
|
||||
// PREF: page reflow timer
|
||||
// Rather than wait until a page has completely downloaded to display it to the user,
|
||||
@@ -54,8 +54,8 @@
|
||||
// [2] https://web.archive.org/web/20240115073722/https://dev.opera.com/articles/efficient-javascript/?page=3#reflow
|
||||
// [3] https://web.archive.org/web/20240115073722/https://dev.opera.com/articles/efficient-javascript/?page=3#smoothspeed
|
||||
//user_pref("content.notify.interval", 100000); // (.10s); default=120000 (.12s)
|
||||
//user_pref("content.max.tokenizing.time", 1000000); // (1.00s); alt=2000000; HIDDEN
|
||||
//user_pref("content.interrupt.parsing", true); // HIDDEN
|
||||
//user_pref("content.max.tokenizing.time", 1000000); // (1.00s); alt=2000000; HIDDEN
|
||||
//user_pref("content.interrupt.parsing", true); // HIDDEN
|
||||
|
||||
// PREF: UI responsiveness threshold
|
||||
//user_pref("content.switch.threshold", 300000); // HIDDEN; default= 750000; alt=500000
|
||||
@@ -142,9 +142,9 @@
|
||||
// [2] https://github.com/yokoffing/Betterfox/issues/153
|
||||
// [3] https://github.com/yokoffing/Betterfox/issues/198
|
||||
//user_pref("gfx.canvas.accelerated", true); // [DEFAULT FF133+]
|
||||
//user_pref("gfx.canvas.accelerated.cache-items", 4096); // [default=8192 FF135+]; Chrome=4096
|
||||
//user_pref("gfx.canvas.accelerated.cache-size", 512); // default=256; Chrome=512
|
||||
//user_pref("gfx.canvas.max-size", 32767); // DEFAULT=32767
|
||||
//user_pref("gfx.canvas.accelerated.cache-items", 8192); // [DEFAULT FF135+]
|
||||
user_pref("gfx.canvas.accelerated.cache-size", 512); // default=256; Chrome=512; max=2048
|
||||
//user_pref("gfx.canvas.max-size", 32767); // [DEFAULT]
|
||||
|
||||
// PREF: WebGL
|
||||
//user_pref("webgl.max-size", 16384); // default=1024
|
||||
@@ -182,7 +182,7 @@
|
||||
//user_pref("browser.cache.disk.capacity", 512000); // default=256000; size of disk cache; 1024000=1GB, 2048000=2GB
|
||||
//user_pref("browser.cache.disk.max_entry_size", 51200); // DEFAULT (50 MB); maximum size of an object in disk cache
|
||||
|
||||
// PREF: Race Cache With Network (RCWN) [FF59+]
|
||||
// PREF: Race Cache With Network (RCWN) [FF59+] [REMOVED FF152+]
|
||||
// [ABOUT] about:networking#rcwn
|
||||
// Firefox concurrently sends requests for cached resources to both the
|
||||
// local disk cache and the network server. The browser uses whichever
|
||||
@@ -197,10 +197,8 @@
|
||||
// [4] https://askubuntu.com/questions/1214862/36-syns-in-a-row-how-to-limit-firefox-connections-to-one-website
|
||||
// [5] https://bugzilla.mozilla.org/show_bug.cgi?id=1622859
|
||||
// [6] https://soylentnews.org/comments.pl?noupdate=1&sid=40195&page=1&cid=1067867#commentwrap
|
||||
//user_pref("network.http.rcwn.enabled", false);
|
||||
|
||||
// PREF: attempt to RCWN only if a resource is smaller than this size
|
||||
//user_pref("network.http.rcwn.small_resource_size_kb", 256); // DEFAULT
|
||||
//user_pref("network.http.rcwn.enabled", false); // [REMOVED FF152+]
|
||||
//user_pref("network.http.rcwn.small_resource_size_kb", 256); // attempt to RCWN only if a resource is smaller than this size
|
||||
|
||||
// PREF: cache memory pool
|
||||
// Cache v2 provides a memory pool that stores metadata (such as response headers)
|
||||
@@ -300,7 +298,7 @@
|
||||
// is no reason for Firefox to keep memory for this.
|
||||
// -1=determine automatically (8 pages)
|
||||
// [1] https://kb.mozillazine.org/Browser.sessionhistory.max_total_viewers#Possible_values_and_their_effects
|
||||
//user_pref("browser.sessionhistory.max_total_viewers", 4); // default=8
|
||||
user_pref("browser.sessionhistory.max_total_viewers", 4); // default=8
|
||||
//user_pref("browser.sessionstore.max_tabs_undo", 10); // default=25
|
||||
//user_pref("browser.sessionstore.max_entries", 10); // [HIDDEN OR REMOVED]
|
||||
//user_pref("dom.storage.default_quota", 20480); // 20MB; default=5120
|
||||
@@ -332,8 +330,8 @@
|
||||
// PREF: adjust video buffering periods when not using MSE (in seconds)
|
||||
// [NOTE] Does not affect videos over 720p since they use DASH playback [1]
|
||||
// [1] https://lifehacker.com/preload-entire-youtube-videos-by-disabling-dash-playbac-1186454034
|
||||
//user_pref("media.cache_readahead_limit", 600); // 10 min; default=60; stop reading ahead when our buffered data is this many seconds ahead of the current playback
|
||||
//user_pref("media.cache_resume_threshold", 300); // 5 min; default=30; when a network connection is suspended, don't resume it until the amount of buffered data falls below this threshold
|
||||
user_pref("media.cache_readahead_limit", 3600); // 10 min; default=60; stop reading ahead when our buffered data is this many seconds ahead of the current playback
|
||||
user_pref("media.cache_resume_threshold", 1800); // 5 min; default=30; when a network connection is suspended, don't resume it until the amount of buffered data falls below this threshold
|
||||
|
||||
/****************************************************************************
|
||||
* SECTION: IMAGE CACHE *
|
||||
@@ -341,7 +339,7 @@
|
||||
|
||||
// PREF: image cache
|
||||
//user_pref("image.cache.size", 10485760); // (cache images up to 10MiB in size) [DEFAULT 5242880]
|
||||
//user_pref("image.mem.decode_bytes_at_a_time", 65536); // default=16384; alt=32768; chunk size for calls to the image decoders
|
||||
user_pref("image.mem.decode_bytes_at_a_time", 32768); // default=16384; chunk size for calls to the image decoders
|
||||
//user_pref("image.mem.max_decoded_image_kb", 512000); // 500MB [HIDDEN OR REMOVED?]
|
||||
|
||||
// PREF: set minimum timeout to unmap shared surfaces since they have been last used
|
||||
@@ -369,11 +367,11 @@
|
||||
// [1] https://kb.mozillazine.org/Network.http.max-connections
|
||||
// [2] https://kb.mozillazine.org/Network.http.max-persistent-connections-per-server
|
||||
// [3] https://www.reddit.com/r/firefox/comments/11m2yuh/how_do_i_make_firefox_use_more_of_my_900_megabit/jbfmru6/
|
||||
//user_pref("network.http.max-connections", 1800); // default=900
|
||||
//user_pref("network.http.max-persistent-connections-per-server", 10); // default=6; download connections; anything above 10 is excessive
|
||||
//user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5); // default=3
|
||||
//user_pref("network.http.max-persistent-connections-per-proxy", 48); // default=32
|
||||
//user_pref("network.http.request.max-start-delay", 5); // default=10
|
||||
user_pref("network.http.max-connections", 1800); // default=900
|
||||
user_pref("network.http.max-persistent-connections-per-server", 10); // default=6; download connections; anything above 10 is excessive
|
||||
user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5); // default=3
|
||||
//user_pref("network.http.max-persistent-connections-per-proxy", 32); // default=32
|
||||
user_pref("network.http.request.max-start-delay", 5); // default=10
|
||||
//user_pref("network.websocket.max-connections", 200); // DEFAULT
|
||||
|
||||
// PREF: pacing requests [FF23+]
|
||||
@@ -385,18 +383,18 @@
|
||||
// may provide a small speed boost when loading pages with lots of requests.
|
||||
// false = Firefox will send as many requests as possible without pacing
|
||||
// true = Firefox will pace requests (default)
|
||||
//user_pref("network.http.pacing.requests.enabled", false);
|
||||
//user_pref("network.http.pacing.requests.min-parallelism", 10); // default=6
|
||||
//user_pref("network.http.pacing.requests.burst", 32); // default=10
|
||||
user_pref("network.http.pacing.requests.enabled", false);
|
||||
//user_pref("network.http.pacing.requests.min-parallelism", 12); // default=6
|
||||
//user_pref("network.http.pacing.requests.burst", 20); // default=10
|
||||
|
||||
// PREF: increase DNS cache
|
||||
// [1] https://developer.mozilla.org/en-US/docs/Web/Performance/Understanding_latency
|
||||
//user_pref("network.dnsCacheEntries", 10000); // default=800
|
||||
//user_pref("network.dnsCacheEntries", 1600); // default=800
|
||||
|
||||
// PREF: adjust DNS expiration time
|
||||
// [ABOUT] about:networking#dns
|
||||
// [NOTE] These prefs will be ignored by DNS resolver if using DoH/TRR.
|
||||
//user_pref("network.dnsCacheExpiration", 3600); // keep entries for 1 hour; default=60
|
||||
user_pref("network.dnsCacheExpiration", 3600); // keep entries for 1 hour; default=60
|
||||
//user_pref("network.dnsCacheExpirationGracePeriod", 120); // default=60; cache DNS entries for 2 minutes after they expire
|
||||
|
||||
// PREF: the number of threads for DNS
|
||||
@@ -404,7 +402,7 @@
|
||||
//user_pref("network.dns.max_any_priority_threads", 24); // DEFAULT [FF 123?]
|
||||
|
||||
// PREF: increase TLS token caching
|
||||
//user_pref("network.ssl_tokens_cache_capacity", 10240); // default=2048; more TLS token caching (fast reconnects)
|
||||
user_pref("network.ssl_tokens_cache_capacity", 10240); // default=2048; more TLS token caching (fast reconnects)
|
||||
|
||||
/****************************************************************************
|
||||
* SECTION: EXPERIMENTAL *
|
||||
|
||||
+9
-1
@@ -3,7 +3,7 @@
|
||||
* Peskyfox *
|
||||
* "Aquila non capit muscas" *
|
||||
* priority: remove annoyances *
|
||||
* version: 148 *
|
||||
* version: 152 *
|
||||
* url: https://github.com/yokoffing/Betterfox *
|
||||
* credit: Some prefs are reproduced and adapted from the arkenfox project *
|
||||
* credit urL: https://github.com/arkenfox/user.js *
|
||||
@@ -94,6 +94,14 @@ user_pref("browser.privateWindowSeparation.enabled", false);
|
||||
// PREF: new tab page wallpapers
|
||||
//user_pref("browser.newtabpage.activity-stream.newtabWallpapers.v2.enabled", true); // [DEFAULT FF132+]
|
||||
|
||||
// PREF: browser scrollbar styles
|
||||
// 0 - Default
|
||||
// 1 - Thin and round, more like Chromium ones
|
||||
// 2 - Thinner than 1
|
||||
// 3 - Even thinner than 1
|
||||
// 4 - Very bold and square
|
||||
//user_pref("widget.non-native-theme.scrollbar.style", 0); // [DEFAULT]
|
||||
|
||||
/****************************************************************************
|
||||
* SECTION: AI *
|
||||
****************************************************************************/
|
||||
|
||||
@@ -92,11 +92,6 @@ Betterfox is an opinionated preference list inspired by the [law of diminishing
|
||||
|
||||
If you like the project, leave a :star: (top right) and become a [stargazer](https://github.com/yokoffing/Betterfox/stargazers)!
|
||||
|
||||
[](https://github.com/yokoffing/Betterfox/stargazers)
|
||||
|
||||
<a href='https://ko-fi.com/Q5Q5G8EPH' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
||||
<noscript><a href="https://liberapay.com/yokoffing/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
|
||||
|
||||
## Credit
|
||||
* Betterfox mirrors the ongoing work provided by [arkenfox](https://github.com/arkenfox/user.js). Additionally, this repository includes content reproduced or adapted from other sources. Credit for overlapping material goes to the original authors.
|
||||
* Appreciation goes to the [Firefox](https://www.mozilla.org/en-US/firefox/new/) team and developers working on [Bugzilla](https://bugzilla.mozilla.org/home), fighting for the open web.
|
||||
|
||||
+13
-5
@@ -3,7 +3,7 @@
|
||||
* Securefox *
|
||||
* "Natura non contristatur" *
|
||||
* priority: provide sensible security and privacy *
|
||||
* version: 150 *
|
||||
* version: 152 *
|
||||
* url: https://github.com/yokoffing/Betterfox *
|
||||
* credit: Most prefs are reproduced and adapted from the arkenfox project *
|
||||
* credit urL: https://github.com/arkenfox/user.js *
|
||||
@@ -46,15 +46,20 @@ user_pref("browser.contentblocking.category", "strict"); // [HIDDEN PREF]
|
||||
// Opener and redirect heuristics are granted for 30 days, see [3]
|
||||
// [1] https://blog.mozilla.org/security/2021/07/13/smartblock-v2/
|
||||
// [2] https://hg.mozilla.org/mozilla-central/rev/e5483fd469ab#l4.12
|
||||
// [3] https://developer.mozilla.org/docs/Web/Privacy/State_Partitioning#storage_access_heuristics
|
||||
// user_pref("privacy.antitracking.enableWebcompat", false);
|
||||
// [3] https://developer.mozilla.org/docs/Web/Privacy/Guides/State_Partitioning#storage_access_heuristics
|
||||
//user_pref("privacy.antitracking.enableWebcompat", false);
|
||||
//user_pref("privacy.restrict3rdpartystorage.heuristic.navigation", false);
|
||||
//user_pref("privacy.restrict3rdpartystorage.heuristic.opened_window_after_interaction", false);
|
||||
//user_pref("privacy.restrict3rdpartystorage.heuristic.recently_visited", false); // DEFAULT
|
||||
//user_pref("privacy.restrict3rdpartystorage.heuristic.redirect", false); // DEFAULT
|
||||
//user_pref("privacy.restrict3rdpartystorage.heuristic.window_open", false); // DEFAULT
|
||||
|
||||
// PREF: set ETP Strict/Custom exception lists (FF141+)
|
||||
// [SETTING] Options>Privacy & Security>Enhanced Tracking Protection>Strict/Custom>Fix major [baseline] | minor [convenience]
|
||||
// [1] https://support.mozilla.org/en-US/kb/manage-enhanced-tracking-protection-exceptions
|
||||
// [2] https://etp-exceptions.mozilla.org/
|
||||
// user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true); // [DEFAULT: true]
|
||||
// user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true); // [DEFAULT: true]
|
||||
//user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true); // [DEFAULT: true]
|
||||
//user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true); // [DEFAULT: true]
|
||||
|
||||
// PREF: query stripping
|
||||
// Currently uses a small list [1]
|
||||
@@ -1069,6 +1074,9 @@ user_pref("editor.truncate_user_pastes", false);
|
||||
// [1] https://bugzilla.mozilla.org/buglist.cgi?bug_id=1695693,1719301
|
||||
//user_pref("network.http.windows-sso.enabled", false); // DEFAULT
|
||||
|
||||
// PREF: disable passkeys
|
||||
//user_pref("security.webauth.webauthn", false);
|
||||
|
||||
// PREF: enforce no direct attestation in passkeys [FF144+]
|
||||
// [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1981587 ***/
|
||||
//user_pref("security.webauthn.always_allow_direct_attestation", false); // [DEFAULT: false]
|
||||
|
||||
+7
-9
@@ -99,7 +99,7 @@ def _get_default_profile_folder(firefox_root):
|
||||
print(f"Reading {config_path}...")
|
||||
|
||||
config_parser = ConfigParser(strict=False)
|
||||
config_parser.read(config_path, encoding = "utf8")
|
||||
config_parser.read(config_path)
|
||||
|
||||
path = None
|
||||
for section in config_parser.sections():
|
||||
@@ -174,17 +174,12 @@ def download_betterfox(url):
|
||||
def extract_betterfox(data, profile_folder):
|
||||
zipfile = ZipFile(data)
|
||||
userjs_zipinfo = None
|
||||
depth = 1 # default to firefox user.js living at root dir
|
||||
if args.browser != "firefox":
|
||||
depth = 2 # ignore the outside
|
||||
for file in zipfile.filelist:
|
||||
path = file.filename.split("/")
|
||||
if len(path)-1 != depth or (args.browser not in path and depth != 1) :
|
||||
if "/zen/" in file.filename and not args.zen:
|
||||
continue
|
||||
if file.filename.endswith("user.js"):
|
||||
userjs_zipinfo = file
|
||||
userjs_zipinfo.filename = Path(userjs_zipinfo.filename).name
|
||||
break
|
||||
|
||||
if not userjs_zipinfo:
|
||||
raise BaseException("Could not find user.js!")
|
||||
@@ -217,15 +212,18 @@ if __name__ == "__main__":
|
||||
|
||||
default_profile_folder = _get_default_profile_folder(firefox_root)
|
||||
|
||||
argparser = ArgumentParser()
|
||||
argparser = ArgumentParser(
|
||||
|
||||
)
|
||||
argparser.add_argument("--overrides", "-o", default=default_profile_folder.joinpath("user-overrides.js"), help="if the provided file exists, add overrides to user.js. Defaults to " + str(default_profile_folder.joinpath("user-overrides.js"))),
|
||||
argparser.add_argument("--zen", "-z", action="store_true", default=False, help="Install user.js for the Zen browser instead. Defaults to False"),
|
||||
|
||||
|
||||
advanced = argparser.add_argument_group("Advanced")
|
||||
advanced.add_argument("--betterfox-version", "-bv", default=None, help=f"Which version of Betterfox to install. Defaults to the latest compatible release for your installed Firefox version")
|
||||
advanced.add_argument("--profile-dir", "-p", "-pd", default=default_profile_folder, help=f"Which profile dir to install user.js in. Defaults to {default_profile_folder}")
|
||||
advanced.add_argument("--repository-owner", "-ro", default="yokoffing", help="owner of the Betterfox repository. Defaults to yokoffing")
|
||||
advanced.add_argument("--repository-name", "-rn", default="Betterfox", help="name of the Betterfox repository. Defaults to Betterfox")
|
||||
advanced.add_argument("--browser", "-b", default="firefox", help="Which browser should Betterfox install to. Defaults to firefox. Available options: firefox, zen, waterfox")
|
||||
|
||||
disable = argparser.add_argument_group("Disable functionality")
|
||||
disable.add_argument("--no-backup", "-nb", action="store_true", default=False, help="disable backup of current profile (not recommended)"),
|
||||
|
||||
Reference in New Issue
Block a user