-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathfirefox.js
3341 lines (2761 loc) · 159 KB
/
firefox.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
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#filter dumbComments emptyLines substitution
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Non-static prefs that are specific to desktop Firefox belong in this file
// (unless there is a compelling and documented reason for them to belong in
// another file).
//
// Please indent all prefs defined within #ifdef/#ifndef conditions. This
// improves readability, particular for conditional blocks that exceed a single
// screen.
#ifdef XP_UNIX
#ifndef XP_MACOSX
#define UNIX_BUT_NOT_MAC
#endif
#endif
pref("browser.hiddenWindowChromeURL", "chrome://browser/content/hiddenWindowMac.xhtml");
// Set add-ons abuse report related prefs specific to Firefox Desktop.
pref("extensions.abuseReport.enabled", true);
// Enables some extra Extension System Logging (can reduce performance)
pref("extensions.logging.enabled", false);
// Disables strict compatibility, making addons compatible-by-default.
pref("extensions.strictCompatibility", false);
pref("extensions.webextOptionalPermissionPrompts", true);
// If enabled, install origin permission verification happens after addons are downloaded.
pref("extensions.postDownloadThirdPartyPrompt", true);
// Preferences for AMO integration
pref("extensions.getAddons.cache.enabled", true);
pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/");
pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
pref("extensions.getAddons.browserMappings.url", "https://services.addons.mozilla.org/api/v5/addons/browser-mappings/?browser=%BROWSER%");
// The URL for the privacy policy related to recommended extensions.
pref("extensions.recommendations.privacyPolicyUrl", "https://www.mozilla.org/privacy/firefox/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_content=privacy-policy-link#addons");
// The URL for Firefox Color, recommended on the theme page in about:addons.
pref("extensions.recommendations.themeRecommendationUrl", "https://color.firefox.com/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_content=theme-footer-link");
pref("extensions.update.autoUpdateDefault", true);
// Check AUS for system add-on updates.
pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
pref("extensions.systemAddon.update.enabled", true);
// Disable add-ons that are not installed by the user in all scopes by default.
// See the SCOPE constants in AddonManager.sys.mjs for values to use here.
pref("extensions.autoDisableScopes", 15);
// Scopes to scan for changes at startup.
pref("extensions.startupScanScopes", 0);
pref("extensions.geckoProfiler.acceptedExtensionIds", "geckoprofiler@mozilla.com,quantum-foxfooding@mozilla.com,raptor@mozilla.org");
pref("extensions.webextensions.remote", true);
// Require signed add-ons by default
pref("extensions.langpacks.signatures.required", true);
pref("xpinstall.signatures.required", true);
// Dictionary download preference
pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/language-tools/");
// At startup, should we check to see if the installation
// date is older than some threshold
pref("app.update.checkInstallTime", true);
// The number of days a binary is permitted to be old without checking is defined in
// firefox-branding.js (app.update.checkInstallTime.days)
// The minimum delay in seconds for the timer to fire between the notification
// of each consumer of the timer manager.
// minimum=30 seconds, default=120 seconds, and maximum=300 seconds
pref("app.update.timerMinimumDelay", 120);
// The minimum delay in milliseconds for the first firing after startup of the timer
// to notify consumers of the timer manager.
// minimum=10 seconds, default=30 seconds, and maximum=120 seconds
pref("app.update.timerFirstInterval", 30000);
// App-specific update preferences
// The interval to check for updates (app.update.interval) is defined in
// firefox-branding.js
// Enables some extra Application Update Logging (can reduce performance)
pref("app.update.log", false);
// Causes Application Update Logging to be sent to a file in the profile
// directory. This preference is automatically disabled on application start to
// prevent it from being left on accidentally. Turning this pref on enables
// logging, even if app.update.log is false.
pref("app.update.log.file", false);
// The number of general background check failures to allow before notifying the
// user of the failure. User initiated update checks always notify the user of
// the failure.
pref("app.update.backgroundMaxErrors", 10);
// How many times we should let downloads fail before prompting the user to
// download a fresh installer.
pref("app.update.download.maxAttempts", 2);
// How many times we should let an elevation prompt fail before prompting the user to
// download a fresh installer.
pref("app.update.elevate.maxAttempts", 2);
#ifdef NIGHTLY_BUILD
// Whether to delay popup notifications when an update is available and
// suppress them when an update is installed and waiting for user to restart.
// If set to true, these notifications will immediately be shown as banners in
// the app menu and as badges on the app menu button. Update available
// notifications will not create popup prompts until a week has passed without
// the user installing the update. Update restart notifications will not
// create popup prompts at all. This doesn't affect update notifications
// triggered by errors/failures or manual install prompts.
pref("app.update.suppressPrompts", false);
#endif
// If set to true, a message will be displayed in the hamburger menu while
// an update is being downloaded.
pref("app.update.notifyDuringDownload", false);
// If set to true, the Update Service will automatically download updates if the
// user can apply updates. This pref is no longer used on Windows, except as the
// default value to migrate to the new location that this data is now stored
// (which is in a file in the update directory). Because of this, this pref
// should no longer be used directly. Instead, getAppUpdateAutoEnabled and
// getAppUpdateAutoEnabled from UpdateUtils.sys.mjs should be used.
#ifndef XP_WIN
pref("app.update.auto", true);
#endif
// If set to true, the Update Service will apply updates in the background
// when it finishes downloading them.
pref("app.update.staging.enabled", true);
// Update service URL:
// app.update.url was removed in Bug 1568994
// app.update.url.manual is in branding section
// app.update.url.details is in branding section
// app.update.badgeWaitTime is in branding section
// app.update.interval is in branding section
// app.update.promptWaitTime is in branding section
// Whether or not to attempt using the service for updates.
#ifdef MOZ_MAINTENANCE_SERVICE
pref("app.update.service.enabled", true);
#endif
#ifdef MOZ_BITS_DOWNLOAD
// If set to true, the Update Service will attempt to use Windows BITS to
// download updates and will fallback to downloading internally if that fails.
pref("app.update.BITS.enabled", true);
#endif
pref("app.update.langpack.enabled", true);
#if defined(MOZ_UPDATE_AGENT)
pref("app.update.background.loglevel", "error");
pref("app.update.background.timeoutSec", 600);
// By default, check for updates when the browser is not running every 7 hours.
pref("app.update.background.interval", 25200);
// By default, snapshot Firefox Messaging System targeting for use by the
// background update task every 60 minutes.
pref("app.update.background.messaging.targeting.snapshot.intervalSec", 3600);
// For historical reasons, the background update process requires the Mozilla
// Maintenance Service to be available and enabled via the service registry
// key. When this value is `true`, allow the background update process to
// update unelevated installations (that are writeable, etc).
//
// N.b. This feature impacts the `applications: firefox_desktop` Nimbus
// application ID (and not the `firefox_desktop_background_task` application
// ID). However, the pref will be automatically mirrored to the background
// update task profile. This means that experiments and enrollment impact the
// Firefox Desktop browsing profile that _schedules_ the background update
// task, and then the background update task collects telemetry in accordance
// with the mirrored pref.
pref("app.update.background.allowUpdatesForUnelevatedInstallations", false);
#endif
#ifdef XP_MACOSX
// If set to true, Firefox will automatically restart if it is left running
// with no browser windows open.
pref("app.update.noWindowAutoRestart.enabled", true);
// How long to wait after all browser windows are closed before restarting,
// in milliseconds. 5 min = 300000 ms
pref("app.update.noWindowAutoRestart.delayMs", 300000);
#endif
// The Multi Session Install Lockout prevents updates from being installed at
// startup when they normally would be if there are other instances using the
// installation. We only do this for a limited amount of time before we go ahead
// and apply the update anyways.
// Hopefully, at some point, updating Firefox while it is running will not break
// things and this mechanism can be removed.
// Note that these prefs are bit dangerous because having different values in
// different profiles could cause erratic behavior.
// This feature is also affected by
// `app.update.multiSessionInstallLockout.timeoutMs`, which is in the branding
// section.
pref("app.update.multiSessionInstallLockout.enabled", true);
#if defined(MOZ_BACKGROUNDTASKS)
// The amount of time, in seconds, before background tasks time out and exit.
// Tasks can override this default (10 minutes).
pref("toolkit.backgroundtasks.defaultTimeoutSec", 600);
#if defined(ENABLE_TESTS)
// Test prefs to verify background tasks inheret and override browser prefs
// correctly.
pref("toolkit.backgroundtasks.tests.browserPrefsInherited", 15);
pref("toolkit.backgroundtasks.tests.browserPrefsOverriden", 16);
#endif
#endif
// Symmetric (can be overridden by individual extensions) update preferences.
// e.g.
// extensions.{GUID}.update.enabled
// extensions.{GUID}.update.url
// .. etc ..
//
pref("extensions.update.enabled", true);
pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
pref("extensions.update.interval", 86400); // Check for updates to Extensions and
// Themes every day
pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes");
#if defined(MOZ_WIDEVINE_EME)
pref("browser.eme.ui.enabled", true);
#else
pref("browser.eme.ui.enabled", false);
#endif
// UI tour experience.
pref("browser.uitour.enabled", true);
pref("browser.uitour.loglevel", "Error");
pref("browser.uitour.requireSecure", true);
pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tour/");
// How long to show a Hearbeat survey (two hours, in seconds)
pref("browser.uitour.surveyDuration", 7200);
pref("keyword.enabled", true);
// Fixup whitelists, the urlbar won't try to search for these words, but will
// instead consider them valid TLDs. Don't check these directly, use
// Services.uriFixup.isDomainKnown() instead.
pref("browser.fixup.domainwhitelist.localhost", true);
// https://tools.ietf.org/html/rfc2606
pref("browser.fixup.domainsuffixwhitelist.test", true);
pref("browser.fixup.domainsuffixwhitelist.example", true);
pref("browser.fixup.domainsuffixwhitelist.invalid", true);
pref("browser.fixup.domainsuffixwhitelist.localhost", true);
// https://tools.ietf.org/html/draft-wkumari-dnsop-internal-00
pref("browser.fixup.domainsuffixwhitelist.internal", true);
// https://tools.ietf.org/html/rfc6762
pref("browser.fixup.domainsuffixwhitelist.local", true);
// Whether to always go through the DNS server before sending a single word
// search string, that may contain a valid host, to a search engine.
pref("browser.fixup.dns_first_for_single_words", false);
#ifdef UNIX_BUT_NOT_MAC
pref("general.autoScroll", false);
#else
pref("general.autoScroll", true);
#endif
// UI density of the browser chrome. This mostly affects toolbarbutton
// and urlbar spacing. The possible values are 0=normal, 1=compact, 2=touch.
pref("browser.uidensity", 0);
// Whether Firefox will automatically override the uidensity to "touch"
// while the user is in a touch environment (such as Windows tablet mode).
pref("browser.touchmode.auto", true);
// Whether Firefox will show the Compact Mode UIDensity option.
pref("browser.compactmode.show", false);
// At startup, check if we're the default browser and prompt user if not.
pref("browser.shell.checkDefaultBrowser", true);
pref("browser.shell.shortcutFavicons",true);
pref("browser.shell.mostRecentDateSetAsDefault", "");
pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", true);
pref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun", false);
pref("browser.shell.defaultBrowserCheckCount", 0);
#if defined(XP_WIN)
// Attempt to set the default browser on Windows 10 using the UserChoice registry keys,
// before falling back to launching the modern Settings dialog.
pref("browser.shell.setDefaultBrowserUserChoice", true);
// When setting default via UserChoice, temporarily rename an ancestor registry key to
// prevent kernel drivers from locking the UserChoice subkeys.
pref("browser.shell.setDefaultBrowserUserChoice.regRename", true);
// When setting the default browser on Windows 10 using the UserChoice
// registry keys, also try to set Firefox as the default PDF handler.
pref("browser.shell.setDefaultPDFHandler", true);
// When setting Firefox as the default PDF handler (subject to conditions
// above), only set Firefox as the default PDF handler when the existing handler
// is a known browser, and not when existing handler is another PDF handler such
// as Acrobat Reader or Nitro PDF.
pref("browser.shell.setDefaultPDFHandler.onlyReplaceBrowsers", true);
// Whether or not to we are allowed to prompt the user to set Firefox as their
// default PDF handler.
pref("browser.shell.checkDefaultPDF", true);
// Will be set to `true` if the user indicates that they don't want to be asked
// again about Firefox being their default PDF handler any more.
pref("browser.shell.checkDefaultPDF.silencedByUser", false);
// Whether or not the user should be shown the guidance notifications when
// setting Firefox as their default browser.
pref("browser.shell.setDefaultGuidanceNotifications", true);
#endif
// 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
// The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
pref("browser.startup.page", 1);
pref("browser.startup.homepage", "about:home");
pref("browser.startup.homepage.abouthome_cache.enabled", true);
pref("browser.startup.homepage.abouthome_cache.loglevel", "Warn");
// Whether we should skip the homepage when opening the first-run page
pref("browser.startup.firstrunSkipsHomepage", true);
// Whether we should show the session-restore infobar on startup
pref("browser.startup.couldRestoreSession.count", 0);
// Show an about:blank window as early as possible for quick startup feedback.
// Held to nightly on Linux due to bug 1450626.
// Disabled on Mac because the bouncing dock icon already provides feedback.
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) && defined(NIGHTLY_BUILD)
pref("browser.startup.blankWindow", true);
#else
pref("browser.startup.blankWindow", false);
#endif
// Show a skeleton UI window prior to loading libxul. Only visible for windows
// users as it is not implemented anywhere else.
#if defined(XP_WIN)
pref("browser.startup.preXulSkeletonUI", true);
// Whether the checkbox to enable Windows launch on login is shown
pref("browser.startup.windowsLaunchOnLogin.enabled", true);
// Whether to show the launch on login infobar notification
pref("browser.startup.windowsLaunchOnLogin.disableLaunchOnLoginPrompt", false);
#endif
// Show an upgrade dialog on major upgrades.
pref("browser.startup.upgradeDialog.enabled", false);
pref("browser.chrome.site_icons", true);
// browser.warnOnQuit == false will override all other possible prompts when quitting or restarting
pref("browser.warnOnQuit", true);
// Whether to warn when quitting when using the shortcut key.
#if defined(XP_WIN)
pref("browser.warnOnQuitShortcut", false);
#else
pref("browser.warnOnQuitShortcut", true);
#endif
// TODO bug 1702563: Renable fullscreen autohide by default on macOS.
#ifdef XP_MACOSX
pref("browser.fullscreen.autohide", false);
#else
pref("browser.fullscreen.autohide", true);
#endif
pref("browser.overlink-delay", 80);
pref("browser.theme.colorway-closet", true);
#if defined(MOZ_WIDGET_GTK)
pref("browser.theme.native-theme", true);
#elif defined(XP_MACOSX) && defined(NIGHTLY_BUILD)
pref("browser.theme.native-theme", true);
#else
pref("browser.theme.native-theme", false);
#endif
// Whether expired built-in colorways themes that are active or retained
// should be allowed to check for updates and be updated to an AMO hosted
// theme with the same id (as part of preparing to remove from mozilla-central
// all the expired built-in colorways themes, after existing users have been
// migrated to colorways themes hosted on AMO).
pref("browser.theme.colorway-migration", true);
// Whether using `ctrl` when hitting return/enter in the URL bar
// (or clicking 'go') should prefix 'www.' and suffix
// browser.fixup.alternate.suffix to the URL bar value prior to
// navigating.
pref("browser.urlbar.ctrlCanonizesURLs", true);
// Whether we announce to screen readers when tab-to-search results are
// inserted.
pref("browser.urlbar.accessibility.tabToSearch.announceResults", true);
// Control autoFill behavior
pref("browser.urlbar.autoFill", true);
// Whether enabling adaptive history autofill.
pref("browser.urlbar.autoFill.adaptiveHistory.enabled", false);
// Minimum char length of the user's search string to enable adaptive history
// autofill.
pref("browser.urlbar.autoFill.adaptiveHistory.minCharsThreshold", 0);
// Set default suggest intent threshold value of 0.5
pref("browser.urlbar.intentThreshold", "0.5");
// Set default NER threshold value of 0.5
pref("browser.urlbar.nerThreshold", "0.5");
// Whether to warm up network connections for autofill or search results.
pref("browser.urlbar.speculativeConnect.enabled", true);
// Whether bookmarklets should be filtered out of Address Bar matches.
// This is enabled for security reasons, when true it is still possible to
// search for bookmarklets typing "javascript: " followed by the actual query.
pref("browser.urlbar.filter.javascript", true);
// Focus the content document when pressing the Escape key, if there's no
// remaining typed history.
pref("browser.urlbar.focusContentDocumentOnEsc", true);
// Enable a certain level of urlbar logging to the Browser Console. See
// ConsoleInstance.webidl.
pref("browser.urlbar.loglevel", "Error");
// the maximum number of results to show in autocomplete when doing richResults
pref("browser.urlbar.maxRichResults", 10);
// The maximum number of historical search results to show.
pref("browser.urlbar.maxHistoricalSearchSuggestions", 2);
// The default behavior for the urlbar can be configured to use any combination
// of the match filters with each additional filter adding more results (union).
pref("browser.urlbar.suggest.bookmark", true);
pref("browser.urlbar.suggest.clipboard", true);
pref("browser.urlbar.suggest.history", true);
pref("browser.urlbar.suggest.openpage", true);
pref("browser.urlbar.suggest.remotetab", true);
pref("browser.urlbar.suggest.searches", true);
pref("browser.urlbar.suggest.topsites", true);
pref("browser.urlbar.suggest.engines", true);
pref("browser.urlbar.suggest.calculator", false);
pref("browser.urlbar.suggest.recentsearches", true);
pref("browser.urlbar.suggest.quickactions", true);
pref("browser.urlbar.deduplication.enabled", false);
pref("browser.urlbar.deduplication.thresholdDays", 0);
#ifdef EARLY_BETA_OR_EARLIER
pref("browser.urlbar.scotchBonnet.enableOverride", true);
#else
pref("browser.urlbar.scotchBonnet.enableOverride", false);
#endif
// Whether or not Unified Search Button is shown always.
pref("browser.urlbar.unifiedSearchButton.always", false);
// Enable trending suggestions and recent searches.
pref("browser.urlbar.trending.featureGate", true);
pref("browser.urlbar.trending.requireSearchMode", false);
pref("browser.urlbar.recentsearches.featureGate", true);
// Enable Rich Entities.
pref("browser.urlbar.richSuggestions.featureGate", true);
pref("browser.search.param.search_rich_suggestions", "fen");
// Feature gate pref for weather suggestions in the urlbar.
#ifdef NIGHTLY_BUILD
pref("browser.urlbar.weather.featureGate", true);
#else
pref("browser.urlbar.weather.featureGate", false);
#endif
// Enable clipboard suggestions feature, the pref should be removed once stable.
pref("browser.urlbar.clipboard.featureGate", false);
// The minimum prefix length of a weather keyword the user must type to trigger
// the suggestion. 0 means the min length should be taken from Nimbus or remote
// settings.
pref("browser.urlbar.weather.minKeywordLength", 0);
// The UI treatment to use for weather suggestions. Possible values:
// 0: (default) Simplest UI with current temperature and location
// 1: Simpler UI, adds current conditions, high/low, and URL
// 2: Full UI, adds forecast
pref("browser.urlbar.weather.uiTreatment", 0);
// If `browser.urlbar.weather.featureGate` is true, this controls whether
// weather suggestions are turned on.
pref("browser.urlbar.suggest.weather", true);
// If `browser.urlbar.trending.featureGate` is true, this controls whether
// trending suggestions are turned on.
pref("browser.urlbar.suggest.trending", true);
// Whether non-sponsored quick suggest results are shown in the urlbar. This
// pref is exposed to the user in the UI, and it's sticky so that its
// user-branch value persists regardless of whatever Firefox Suggest scenarios,
// with their various default-branch values, the user is enrolled in over time.
pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false, sticky);
// Whether sponsored quick suggest results are shown in the urlbar. This pref is
// exposed to the user in the UI, and it's sticky so that its user-branch value
// persists regardless of whatever Firefox Suggest scenarios, with their various
// default-branch values, the user is enrolled in over time.
pref("browser.urlbar.suggest.quicksuggest.sponsored", false, sticky);
// Whether data collection is enabled for quick suggest results in the urlbar.
// This pref is exposed to the user in the UI, and it's sticky so that its
// user-branch value persists regardless of whatever Firefox Suggest scenarios,
// with their various default-branch values, the user is enrolled in over time.
pref("browser.urlbar.quicksuggest.dataCollection.enabled", false, sticky);
// Whether the Firefox Suggest contextual opt-in result is enabled. If true,
// this implicitly disables shouldShowOnboardingDialog.
pref("browser.urlbar.quicksuggest.contextualOptIn", false);
// Controls which variant of the copy is used for the Firefox Suggest
// contextual opt-in result.
pref("browser.urlbar.quicksuggest.contextualOptIn.sayHello", false);
// Controls whether the Firefox Suggest contextual opt-in result appears at
// the top of results or at the bottom, after one-off buttons.
pref("browser.urlbar.quicksuggest.contextualOptIn.topPosition", true);
// Whether the quick suggest feature in the urlbar is enabled.
pref("browser.urlbar.quicksuggest.enabled", false);
// Whether Suggest should be hidden in the settings UI even when enabled.
pref("browser.urlbar.quicksuggest.hideSettingsUI", false);
// Ranking mode of QuickSuggest. Currently used for relevance ranking
// experimentation. It can be any of "default", "interest", and "random".
pref("browser.urlbar.quicksuggest.rankingMode", "default");
// Whether Firefox Suggest will use the new Rust backend instead of the original
// JS backend.
pref("browser.urlbar.quicksuggest.rustEnabled", true);
// Whether to show the QuickSuggest onboarding dialog.
pref("browser.urlbar.quicksuggest.shouldShowOnboardingDialog", false);
// Show QuickSuggest onboarding dialog on the nth browser restarts.
pref("browser.urlbar.quicksuggest.showOnboardingDialogAfterNRestarts", 0);
// The index of sponsored Firefox Suggest results within the Firefox Suggest
// section when "Show search suggestions ahead of browsing history in address bar
// results" is checked. When not checked, the index is hardcoded as -1. Negative
// indexes are relative to the end of the section.
pref("browser.urlbar.quicksuggest.sponsoredIndex", 0);
pref("browser.urlbar.quicksuggest.nonSponsoredIndex", -1);
// Whether quick suggest results can be shown in position specified in the
// suggestions.
pref("browser.urlbar.quicksuggest.allowPositionInSuggestions", true);
// Whether non-sponsored quick suggest results are subject to impression
// frequency caps.
pref("browser.urlbar.quicksuggest.impressionCaps.nonSponsoredEnabled", false);
// Whether sponsored quick suggest results are subject to impression frequency
// caps.
pref("browser.urlbar.quicksuggest.impressionCaps.sponsoredEnabled", false);
// When non-zero, this is the character-count threshold (inclusive) for showing
// AMP suggestions as top picks. If an AMP suggestion is triggered by a keyword
// at least this many characters long, it will be shown as a top pick. Full
// keywords will also show AMP suggestions as top picks even if they have fewer
// characters than this threshold.
pref("browser.urlbar.quicksuggest.ampTopPickCharThreshold", 0);
// The matching strategy for AMP suggestions. Zero is the usual default
// exact-keyword strategy. Other values are the integers defined on
// `AmpMatchingStrategy` in `RustSuggest.sys.mjs` (corresponding to the
// `AmpMatchingStrategy` enum in the Rust component coerced to a 1-based integer
// value).
pref("browser.urlbar.quicksuggest.ampMatchingStrategy", 0);
// Comma-separated list of Suggest exposure suggestion types to enable.
pref("browser.urlbar.quicksuggest.exposureSuggestionTypes", "");
// Whether Suggest will use the ML backend in addition to Rust.
pref("browser.urlbar.quicksuggest.mlEnabled", false);
// Whether unit conversion is enabled.
#ifdef NIGHTLY_BUILD
pref("browser.urlbar.unitConversion.enabled", true);
#else
pref("browser.urlbar.unitConversion.enabled", false);
#endif
// Whether to show search suggestions before general results like history and
// bookmarks.
pref("browser.urlbar.showSearchSuggestionsFirst", true);
// As a user privacy measure, don't fetch search suggestions if a pasted string
// is longer than this.
pref("browser.urlbar.maxCharsForSearchSuggestions", 100);
pref("browser.urlbar.trimURLs", true);
pref("browser.urlbar.trimHttps", false);
pref("browser.urlbar.untrimOnUserInteraction.featureGate", false);
// If changed to true, copying the entire URL from the location bar will put the
// human readable (percent-decoded) URL on the clipboard.
pref("browser.urlbar.decodeURLsOnCopy", false);
// Whether or not to move tabs into the active window when using the "Switch to
// Tab" feature of the awesomebar.
pref("browser.urlbar.switchTabs.adoptIntoActiveWindow", false);
// Controls whether searching for open tabs returns tabs from any container
// or only from the current container.
pref("browser.urlbar.switchTabs.searchAllContainers", true);
// Whether addresses and search results typed into the address bar
// should be opened in new tabs by default.
pref("browser.urlbar.openintab", false);
// Allow the result menu button to be reached with the Tab key.
pref("browser.urlbar.resultMenu.keyboardAccessible", true);
// If true, we show tail suggestions when available.
pref("browser.urlbar.richSuggestions.tail", true);
// If true, top sites may include sponsored ones.
pref("browser.urlbar.sponsoredTopSites", false);
// Global toggle for whether the show search terms feature
// can be used at all, and enabled/disabled by the user.
pref("browser.urlbar.showSearchTerms.featureGate", false);
// If true, show the search term in the Urlbar while on
// a default search engine results page.
pref("browser.urlbar.showSearchTerms.enabled", true);
// Whether the urlbar displays one-offs to filter searches to history,
// bookmarks, or tabs.
pref("browser.urlbar.shortcuts.bookmarks", true);
pref("browser.urlbar.shortcuts.tabs", true);
pref("browser.urlbar.shortcuts.history", true);
// When we send events to Urlbar extensions, we wait this amount of time in
// milliseconds for them to respond before timing out.
pref("browser.urlbar.extension.timeout", 400);
// Controls when to DNS resolve single word search strings, after they were
// searched for. If the string is resolved as a valid host, show a
// "Did you mean to go to 'host'" prompt.
// 0 - never resolve; 1 - use heuristics (default); 2 - always resolve
pref("browser.urlbar.dnsResolveSingleWordsAfterSearch", 0);
// Whether the results panel should be kept open during IME composition.
// The default value is false because some IME open a picker panel, and we end
// up with two panels on top of each other. Since for now we can't detect that
// we leave this choice to the user, hopefully in the future this can be flipped
// for everyone.
pref("browser.urlbar.keepPanelOpenDuringImeComposition", false);
// Whether Firefox Suggest group labels are shown in the urlbar view.
pref("browser.urlbar.groupLabels.enabled", true);
// The Merino endpoint URL, not including parameters.
pref("browser.urlbar.merino.endpointURL", "https://merino.services.mozilla.com/api/v1/suggest");
// Timeout for Merino fetches (ms).
pref("browser.urlbar.merino.timeoutMs", 200);
// Comma-separated list of providers to request from Merino
pref("browser.urlbar.merino.providers", "");
// Comma-separated list of client variants to send to Merino
pref("browser.urlbar.merino.clientVariants", "");
// Enable site specific search result.
pref("browser.urlbar.contextualSearch.enabled", true);
// Feature gate pref for addon suggestions in the urlbar.
pref("browser.urlbar.addons.featureGate", true);
// If `browser.urlbar.addons.featureGate` is true, this controls whether
// addons suggestions are turned on.
pref("browser.urlbar.suggest.addons", true);
// If `browser.urlbar.mdn.featureGate` is true, this controls whether
// mdn suggestions are turned on.
pref("browser.urlbar.suggest.mdn", true);
// Feature gate pref for Yelp suggestions in the urlbar.
pref("browser.urlbar.yelp.featureGate", true);
// The minimum prefix length of a Yelp keyword the user must type to trigger the
// suggestion. 0 means the min length should be taken from Nimbus.
pref("browser.urlbar.yelp.minKeywordLength", 4);
// Whether Yelp suggestions should be shown as top picks.
pref("browser.urlbar.yelp.priority", false);
// Whether Yelp suggestions will be served from the Suggest ML backend instead
// of Rust.
pref("browser.urlbar.yelp.mlEnabled", false);
// If `browser.urlbar.yelp.featureGate` is true, this controls whether
// Yelp suggestions are turned on.
pref("browser.urlbar.suggest.yelp", true);
// Feature gate pref for Fakespot suggestions in the urlbar.
pref("browser.urlbar.fakespot.featureGate", false);
// The minimum prefix length of a Fakespot keyword the user must type to trigger
// the suggestion. 0 means the min length should be taken from Nimbus.
pref("browser.urlbar.fakespot.minKeywordLength", 4);
// The index of Fakespot results within the Firefox Suggest section. A negative
// index is relative to the end of the section.
pref("browser.urlbar.fakespot.suggestedIndex", -1);
// If `browser.urlbar.fakespot.featureGate` is true, this controls whether
// Fakespot suggestions are turned on.
pref("browser.urlbar.suggest.fakespot", true);
// The minimum prefix length of addons keyword the user must type to trigger
// the suggestion. 0 means the min length should be taken from Nimbus.
pref("browser.urlbar.addons.minKeywordLength", 0);
// Feature gate pref for Pocket suggestions in the urlbar.
pref("browser.urlbar.pocket.featureGate", false);
// If `browser.urlbar.pocket.featureGate` is true, this controls whether Pocket
// suggestions are turned on.
pref("browser.urlbar.suggest.pocket", true);
pref("browser.altClickSave", false);
// Enable logging downloads operations to the Console.
pref("browser.download.loglevel", "Error");
// Number of milliseconds to wait for the http headers (and thus
// the Content-Disposition filename) before giving up and falling back to
// picking a filename without that info in hand so that the user sees some
// feedback from their action.
pref("browser.download.saveLinkAsFilenameTimeout", 4000);
pref("browser.download.useDownloadDir", true);
pref("browser.download.folderList", 1);
pref("browser.download.manager.addToRecentDocs", true);
pref("browser.download.manager.resumeOnWakeDelay", 10000);
// This records whether or not the panel has been shown at least once.
pref("browser.download.panel.shown", false);
// This records whether or not to show the 'Open in system viewer' context menu item when appropriate
pref("browser.download.openInSystemViewerContextMenuItem", true);
// This records whether or not to show the 'Always open...' context menu item when appropriate
pref("browser.download.alwaysOpenInSystemViewerContextMenuItem", true);
// Open downloaded file types internally for the given types.
// This is a comma-separated list, the empty string ("") means no types are
// viewable internally.
pref("browser.download.viewableInternally.enabledTypes", "xml,svg,webp,avif,jxl");
// This controls whether the button is automatically shown/hidden depending
// on whether there are downloads to show.
pref("browser.download.autohideButton", true);
// Controls whether to open the downloads panel every time a download begins.
// The first download ever run in a new profile will still open the panel.
pref("browser.download.alwaysOpenPanel", true);
// Determines the behavior of the "Delete" item in the downloads context menu.
// Valid values are 0, 1, and 2.
// 0 - Don't remove the download from session list or history.
// 1 - Remove the download from session list, but not history.
// 2 - Remove the download from both session list and history.
pref("browser.download.clearHistoryOnDelete", 0);
#ifndef XP_MACOSX
pref("browser.helperApps.deleteTempFileOnExit", true);
#endif
// This controls the visibility of the radio button in the
// Unknown Content Type (Helper App) dialog that will open
// the content in the browser for PDF and for other
// Viewable Internally types
// (see browser.download.viewableInternally.enabledTypes)
pref("browser.helperApps.showOpenOptionForPdfJS", true);
pref("browser.helperApps.showOpenOptionForViewableInternally", true);
// search engines URL
pref("browser.search.searchEnginesURL", "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
// search bar results always open in a new tab
pref("browser.search.openintab", false);
// context menu searches open in the foreground
pref("browser.search.context.loadInBackground", false);
// Enables display of the options for the user using a separate default search
// engine in private browsing mode.
pref("browser.search.separatePrivateDefault.ui.enabled", false);
// The maximum amount of times the private default banner is shown.
pref("browser.search.separatePrivateDefault.ui.banner.max", 0);
// Enables search SERP telemetry page categorization.
pref("browser.search.serpEventTelemetryCategorization.enabled", true);
// A count of Glean SERP categorization event metrics that have been recorded
// but not yet submitted in a ping. Needed to prevent sending a ping with only
// experiment info (and not actual SERP categorizations) at startup.
pref("browser.search.serpMetricsRecordedCounter", 0);
// Search Bar removal from the toolbar for users who haven’t used it in 120
// days
pref("browser.search.widget.removeAfterDaysUnused", 120);
// The number of times the search function in the URL bar has been used,
// capped at 100.
pref("browser.search.totalSearches", 0);
// Enable new experimental shopping features. This is solely intended as a
// rollout/"emergency stop" button - it will go away once the feature has
// rolled out. There will be separate controls for user opt-in/opt-out.
pref("browser.shopping.experience2023.enabled", false);
// Ternary int-valued pref indicating if the user has opted into the new
// experimental shopping feature.
// 0 means the user has not opted in or out.
// 1 means the user has opted in.
// 2 means the user has opted out.
pref("browser.shopping.experience2023.optedIn", 0);
// Activates the new experimental shopping sidebar.
// True by default. This is handled by ShoppingUtils.handleAutoActivateOnProduct
// to auto-activate the sidebar for non-opted-in users up to 2 times.
pref("browser.shopping.experience2023.active", true);
// Enables the ad / recommended product feature for the shopping sidebar.
// If enabled, users can disable the ad card using the separate pref
// `browser.shopping.experience2023.ads.userEnabled` and visible toggle
// (this is just the feature flag).
pref("browser.shopping.experience2023.ads.enabled", false);
// Activates the ad card in the shopping sidebar.
// Unlike `browser.shopping.experience2023.ads.enabled`, this pref is controlled by users
// using the visible toggle.
pref("browser.shopping.experience2023.ads.userEnabled", true);
// Saves if shopping survey is enabled.
pref("browser.shopping.experience2023.survey.enabled", true);
// Saves if shopping survey is seen.
pref("browser.shopping.experience2023.survey.hasSeen", false);
// Number of PDP visits used to display shopping survey
pref("browser.shopping.experience2023.survey.pdpVisits", 0);
// Enables the auto-open feature for the shopping sidebar,
// including new callouts and settings UI changes
// (this is just the feature flag).
pref("browser.shopping.experience2023.autoOpen.enabled", false);
// Opens the shopping sidebar automatically when viewing a PDP.
pref("browser.shopping.experience2023.autoOpen.userEnabled", true);
// Number of times the sidebar has been closed in a session
pref("browser.shopping.experience2023.sidebarClosedCount", 0);
// When conditions are met, shows a prompt on the shopping sidebar asking users if they want to disable auto-open behavior
pref("browser.shopping.experience2023.showKeepSidebarClosedMessage", true);
// Integrates the Review Checker shopping feature into the global sidebar
// shoppingSidebar pref should be opposite of this to disable
// the custom shopping sidebar.
pref("browser.shopping.experience2023.integratedSidebar", false);
// Enables showing the Review Checker in the Shopping sidebar.
// integratedSidebar pref should be opposite of this to disable
// the Review Checker sidebar panel.
pref("browser.shopping.experience2023.shoppingSidebar", true);
// Spin the cursor while the page is loading
pref("browser.spin_cursor_while_busy", false);
// Enable display of contextual-password-manager option in browser sidebar
// Keep it hidden from about:config for now.
// pref("browser.contextual-password-manager.enabled", false);
// Enables the display of the Mozilla VPN banner in private browsing windows
pref("browser.privatebrowsing.vpnpromourl", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-%CHANNEL%-browser&utm_campaign=private-browsing-vpn-link");
// Whether the user has opted-in to recommended settings for data features.
pref("browser.dataFeatureRecommendations.enabled", false);
// Use dark theme variant for PBM windows. This is only supported if the theme
// sets darkTheme data.
pref("browser.theme.dark-private-windows", true);
// Pref to control whether or not Private Browsing windows show up
// as separate icons in the Windows taskbar.
pref("browser.privateWindowSeparation.enabled", true);
// Controls visibility of the privacy segmentation preferences section.
pref("browser.privacySegmentation.preferences.show", false);
pref("browser.sessionhistory.max_entries", 50);
// Built-in default permissions.
pref("permissions.manager.defaultsUrl", "resource://app/defaults/permissions");
// Set default fallback values for site permissions we want
// the user to be able to globally change.
pref("permissions.default.camera", 0);
pref("permissions.default.microphone", 0);
pref("permissions.default.geo", 0);
pref("permissions.default.xr", 0);
pref("permissions.default.desktop-notification", 0);
pref("permissions.default.shortcuts", 0);
pref("permissions.desktop-notification.postPrompt.enabled", true);
pref("permissions.desktop-notification.notNow.enabled", false);
pref("permissions.fullscreen.allowed", false);
#ifdef MOZ_WEBRTC
// When users grant camera or microphone through a permission prompt
// and leave "☐ Remember this decision" unchecked, Gecko persists
// their choice to "Always ask" for this permission going forward.
// This is exposed to websites through the permissions.query() API
// as "granted", to ward off well-meaning attempts to further escalate
// permission to always grant, to help sites respect this user choice.
//
// By default, these permissions are only visible in Tools / Page Info.
// But turning this pref on also makes them show up as "Always Ask ✖"
// in the more prominent site permissions dropdown.
pref("permissions.media.show_always_ask.enabled", false);
#endif
// Force external link opens into the default user context ID instead of guessing
// the most appropriate one based on the URL (https://bugzilla.mozilla.org/show_bug.cgi?id=1874599#c8)
pref("browser.link.force_default_user_context_id_for_external_opens", false);
// handle links targeting new windows
// 1=current window/tab, 2=new window, 3=new tab in most recent window
pref("browser.link.open_newwindow", 3);
// handle external links (i.e. links opened from a different application)
// default: use browser.link.open_newwindow
// 1-3: see browser.link.open_newwindow for interpretation
pref("browser.link.open_newwindow.override.external", -1);
// 0: no restrictions - divert everything
// 1: don't divert window.open at all
// 2: don't divert window.open with features
pref("browser.link.open_newwindow.restriction", 2);
// If true, this pref causes windows opened by window.open to be forced into new
// tabs (rather than potentially opening separate windows, depending on
// window.open arguments) when the browser is in fullscreen mode.
// We set this differently on Mac because the fullscreen implementation there is
// different.
#ifdef XP_MACOSX
pref("browser.link.open_newwindow.disabled_in_fullscreen", true);
#else
pref("browser.link.open_newwindow.disabled_in_fullscreen", false);
#endif
// Tabbed browser
pref("browser.tabs.closeTabByDblclick", false);
pref("browser.tabs.closeWindowWithLastTab", true);
pref("browser.tabs.allowTabDetach", true);
// Open related links to a tab, e.g., link in current tab, at next to the
// current tab if |insertRelatedAfterCurrent| is true. Otherwise, always
// append new tab to the end.
pref("browser.tabs.insertRelatedAfterCurrent", true);
// Open all links, e.g., bookmarks, history items at next to current tab
// if |insertAfterCurrent| is true. Otherwise, append new tab to the end
// for non-related links. Note that if this is set to true, it will trump
// the value of browser.tabs.insertRelatedAfterCurrent.
pref("browser.tabs.insertAfterCurrent", false);
// When |insertRelatedAfterCurrent| is true opening a link from a pinned tab
// results in the tabbar scrolling back to the beginning. Setting
// |insertAfterCurrentExceptPinned| to true will add tabs at the end of the
// tabbar.
pref("browser.tabs.insertAfterCurrentExceptPinned", false);