-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.js
350 lines (294 loc) · 14.4 KB
/
user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
/******
* name: Firefox Max Speed UserJS
* version: 115+
* urls: https://github.com/FirefoxUniverse/FirefoxTweaksVN/main/user.js [repo]
* license: MIT
* HOWTO: Go to about:support -> Open Profile Folder -> Save user.js -> Restart (https://voz.vn/goto/post?id=27527209)
* REVERT: https://voz.vn/goto/post?id=27496381
******/
//Dark Mode native: remove /* and */ to activate
//Dark Mode style 1
/*
user_pref("browser.active_color", "blue");
user_pref("browser.display.background_color", "#3f3f3f");
user_pref("browser.display.foreground_color", "#ffffff");
user_pref("browser.anchor_color", "#ffcc99");
user_pref("browser.visited_color", "#cc99ff");
user_pref("browser.display.document_color_use", 2);
user_pref("browser.display.use_system_colors", false);
user_pref("layout.css.forced-colors.enabled", false);
*/
//Dark Mode style 2
/*
user_pref("browser.active_color", "blue");
user_pref("browser.display.background_color", "#121212");
user_pref("browser.display.foreground_color", "#ffffff");
user_pref("browser.anchor_color", "#ffcc99");
user_pref("browser.visited_color", "#cc99ff");
user_pref("browser.display.document_color_use", 2);
user_pref("browser.display.use_system_colors", false);
user_pref("layout.css.forced-colors.enabled", false);
*/
//Dark Mode style Dark Reader
/*
user_pref("browser.active_color", "blue");
user_pref("browser.display.background_color", "#232627");
user_pref("browser.display.foreground_color", "#E4E3DF");
user_pref("browser.anchor_color", "#92BBDE");
user_pref("browser.visited_color", "#ED944F");
user_pref("browser.display.document_color_use", 2);
user_pref("browser.display.use_system_colors", false);
user_pref("layout.css.forced-colors.enabled", false);
*/
//Gray Mode
/*
user_pref("browser.active_color", "blue");
user_pref("browser.display.background_color", "#cccccc");
user_pref("browser.display.foreground_color", "#000000");
user_pref("browser.anchor_color", "#800040");
user_pref("browser.visited_color", "#b93d00");
user_pref("browser.display.document_color_use", 2);
user_pref("browser.display.use_system_colors", false);
user_pref("layout.css.forced-colors.enabled", false);
*/
//Dark Brown Mode
/*
user_pref("browser.active_color", "blue");
user_pref("browser.display.background_color", "#3f3f3f");
user_pref("browser.display.foreground_color", "#c9c9bb");
user_pref("browser.anchor_color", "#dca3a3");
user_pref("browser.visited_color", "#bba66f");
user_pref("browser.display.document_color_use", 2);
user_pref("browser.display.use_system_colors", false);
user_pref("layout.css.forced-colors.enabled", false);
*/
//Light Mode
/*
user_pref("browser.active_color", "#EE0000");
user_pref("browser.display.background_color", "#FFFFFF");
user_pref("browser.display.foreground_color", "#FBFBFE");
user_pref("browser.anchor_color", "#0000EE");
user_pref("browser.visited_color", "#551A8B");
user_pref("browser.display.document_color_use", 1);
user_pref("browser.display.use_system_colors", true);
user_pref("layout.css.forced-colors.enabled", true);
*/
//Tweaks
//Instant start-up
user_pref("browser.startup.preXulSkeletonUI", false);
//Snappier tooltips
user_pref("ui.tooltip.delay_ms", 60);
user_pref("ui.tooltipDelay", 60);
user_pref("ui.submenuDelay", 0);
user_pref("browser.overlink-delay", 10);
//Enable Alt-Tab-like switch, Ctrl+Tab
user_pref("browser.ctrlTab.sortByRecentlyUsed", true);
//Enable userChrome.css
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
//Enable Ctrl+Shift+Alt+I
user_pref("devtools.chrome.enabled", true);
user_pref("devtools.debugger.remote-enabled", true);
user_pref("devtools.debugger.prompt-connection", false);
// Reduce disk read/write
user_pref("browser.sessionstore.idleDelay", 180);
user_pref("browser.sessionstore.interval", 3600000);
//user_pref("browser.sessionstore.collect_zoom", false);
//user_pref("browser.sessionstore.privacy_level", 2);
user_pref("browser.sessionstore.restore_pinned_tabs_on_demand", true);
//user_pref("browser.sessionhistory.max_total_viewers", 0);
// Disable Pocket and Accessibility
user_pref("extensions.pocket.enabled", false);
user_pref("accessibility.force_disabled", 1);
// Disable Taskbar Preview
user_pref("browser.taskbar.lists.enabled", false);
user_pref("browser.taskbar.lists.frequent.enabled", false);
user_pref("browser.taskbar.lists.maxListItemCount", 0);
//user_pref("browser.taskbar.lists.refreshInSeconds", 2147483647);
user_pref("browser.taskbar.lists.tasks.enabled", false);
user_pref("browser.taskbar.previews.max", 0);
// Optimize rendering speed
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-23570551
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-27064564
user_pref("nglayout.initialpaint.delay", 250);
user_pref("nglayout.initialpaint.delay_in_oopif", 250);
//user_pref("content.notify.backoffcount", 0);
//user_pref("content.notify.interval", 2000000);
//user_pref("content.notify.ontimer", true);
// Enable punycode
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-25938099
user_pref("network.IDN_show_punycode", true);
// Prefer no animation
// https://voz.vn/p/33057189/
user_pref("ui.prefersReducedMotion", 1);
// Maximize bandwidth
// https://voz.vn/p/33049233/
user_pref("network.http.http3.cc_algorithm", 0);
// Tweak bytecode
// https://voz.vn/p/32603773/
user_pref("browser.cache.jsbc_compression_level", 2);
user_pref("dom.script_loader.bytecode_cache.strategy", -1);
//user_pref("javascript.options.mem.gc_balanced_heap_limits", true);
// Enable old clear history dialog
user_pref("privacy.sanitize.useOldClearHistoryDialog", true);
// Disable IPv6
//user_pref("network.dns.disableIPv6", true);
// GoogleDNS
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-24688026
//user_pref("network.trr.uri", "https://dns.nextdns.io/");
//user_pref("network.trr.custom_uri", "https://dns.nextdns.io/");
//user_pref("network.trr.mode", 2);
// Enable ECS
//user_pref("network.trr.disable-ECS", false);
// Enable Kyber to access blocked websites
user_pref("security.tls.enable_kyber", true);
// Reduce network request
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-27409530
user_pref("network.http.rcwn.enabled", false);
// Fix Facebook time (ESR <= 115)
user_pref("dom.textMetrics.fontBoundingBox.enabled", true);
// PREF: disable EcoQoS [WINDOWS]
// Background tab processes use efficiency mode on Windows 11 to limit resource use.
// [WARNING] Leave this alone, unless you're on Desktop and you rely on
// background tabs to have maximum performance.
// [1] https://devblogs.microsoft.com/performance-diagnostics/introducing-ecoqos/
// [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1796525
// [3] https://bugzilla.mozilla.org/show_bug.cgi?id=1800412
// [4] https://reddit.com/r/firefox/comments/107fj69/how_can_i_disable_the_efficiency_mode_on_firefox/
user_pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", false);
// PREF: use bigger packets
// Reduce Firefox's CPU usage by requiring fewer application-to-driver data transfers.
// However, it does not affect the actual packet sizes transmitted over the network.
// [1] https://www.mail-archive.com/support-seamonkey@lists.mozilla.org/msg74561.html
// Can cause crashing: https://github.com/BrowserWorks/Waterfox/releases/tag/G6.0.10
user_pref("network.buffer.cache.size", 32768); // 256 kb; default=32768 (32 kb)
user_pref("network.buffer.cache.count", 24); // default=24
// Enable Add Search
user_pref("browser.urlbar.update2.engineAliasRefresh", true);
// Enable Sleeping Tab
user_pref("floorp.tabsleep.enabled", true);
user_pref("floorp.tabsleep.tabTimeoutMinutes", 6);
// Enable PWA
user_pref("browser.ssb.enabled", true);
// Force RAM cache, uncomment // to enable
// https://voz.vn/t/cach-ep-firefox-luu-cache-tren-ram-ma-khong-can-ramdisk.664955/
user_pref("browser.cache.disk.enable", false);
user_pref("browser.cache.memory.enable", true);
user_pref("browser.cache.memory.capacity", 524288);
user_pref("browser.cache.memory.max_entry_size", 512000);
// Disable FastBack to save RAM
//user_pref("fission.bfcacheInParent", false);
//user_pref("fission.disableSessionHistoryInParent", true);
//user_pref("browser.sessionhistory.max_total_viewers", 0);
// Enable Multi-Account Container
//user_pref("privacy.userContext.enabled", true); //enable Multi-Account Container
//user_pref("privacy.userContext.ui.enabled", true); //enable Multi-Account Container
// Enable Cookie Banner Protection
user_pref("cookiebanners.service.mode", 2);
user_pref("cookiebanners.service.mode.privateBrowsing", 2);
// Disable Restricted Domains
user_pref("extensions.webextensions.restrictedDomains", "");
// No Animation Fullscreen
user_pref("browser.fullscreen.animate", true);
user_pref("full-screen-api.transition-duration.enter", "0 0");
user_pref("full-screen-api.transition-duration.leave", "0 0");
// Modal-less mpv:// handler
user_pref("network.protocol-handler.external.mpv", true);
/** Image Decode Buffer Size ***/
user_pref("image.mem.decode_bytes_at_a_time", 32768);
/****************************************************************************
* Betterfox *
* "Ad meliora" *
* version: 128 *
* url: https://github.com/yokoffing/Betterfox *
****************************************************************************/
/****************************************************************************
* SECTION: FASTFOX *
****************************************************************************/
/** TELEMETRY ***/
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.server", "data:,");
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
user_pref("toolkit.telemetry.updatePing.enabled", false);
user_pref("toolkit.telemetry.bhrPing.enabled", false);
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
user_pref("toolkit.telemetry.coverage.opt-out", true);
user_pref("toolkit.coverage.opt-out", true);
user_pref("toolkit.coverage.endpoint.base", "");
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);
/** EXPERIMENTS ***/
user_pref("app.shield.optoutstudies.enabled", false);
user_pref("app.normandy.enabled", false);
user_pref("app.normandy.api_url", "");
/** CRASH REPORTS ***/
user_pref("breakpad.reportURL", "");
user_pref("browser.tabs.crashReporting.sendReport", false);
user_pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
/** DETECTION ***/
user_pref("captivedetect.canonicalURL", "");
user_pref("network.captive-portal-service.enabled", false);
user_pref("network.connectivity-service.enabled", false);
user_pref("dom.private-attribution.submission.enabled", false);
/****************************************************************************
* SECTION: PESKYFOX *
****************************************************************************/
/** MOZILLA UI ***/
user_pref("browser.privatebrowsing.vpnpromourl", "");
user_pref("extensions.getAddons.showPane", false);
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
user_pref("browser.discovery.enabled", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
user_pref("browser.preferences.moreFromMozilla", false);
user_pref("browser.tabs.tabmanager.enabled", false);
user_pref("browser.aboutConfig.showWarning", false);
user_pref("browser.aboutwelcome.enabled", false);
/** THEME ADJUSTMENTS ***/
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("browser.compactmode.show", true);
user_pref("browser.display.focus_ring_on_anything", true);
user_pref("browser.display.focus_ring_style", 0);
user_pref("browser.display.focus_ring_width", 0);
user_pref("layout.css.prefers-color-scheme.content-override", 2);
user_pref("browser.privateWindowSeparation.enabled", false); // WINDOWS
/** FULLSCREEN NOTICE ***/
user_pref("full-screen-api.transition-duration.enter", "0 0");
user_pref("full-screen-api.transition-duration.leave", "0 0");
user_pref("full-screen-api.warning.delay", -1);
user_pref("full-screen-api.warning.timeout", 0);
/** URL BAR ***/
user_pref("browser.urlbar.suggest.calculator", true);
user_pref("browser.urlbar.unitConversion.enabled", true);
user_pref("browser.urlbar.trending.featureGate", false);
/** NEW TAB PAGE ***/
user_pref("browser.newtabpage.activity-stream.feeds.topsites", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
/** POCKET ***/
user_pref("extensions.pocket.enabled", false);
/** PDF ***/
user_pref("browser.download.open_pdf_attachments_inline", true);
/** TAB BEHAVIOR ***/
user_pref("browser.bookmarks.openInTabClosesMenu", false);
user_pref("browser.menu.showViewImageInfo", true);
user_pref("findbar.highlightAll", true);
user_pref("layout.word_select.eat_space_to_next_word", false);
/****************************************************************************
* START: MY OVERRIDES *
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/wiki/Common-Overrides
// visit https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening
// Enter your personal overrides below this line:
/****************************************************************************
* SECTION: SMOOTHFOX *
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/blob/main/Smoothfox.js
// Enter your scrolling overrides below this line:
/****************************************************************************
* END: BETTERFOX *
****************************************************************************/