refactor: disable quit confirmations in browser

This commit is contained in:
zhom
2025-11-30 20:59:04 +04:00
parent 4b6f08fca3
commit 39c2a9f6f0
3 changed files with 13 additions and 0 deletions
+3
View File
@@ -71,6 +71,7 @@
"idlelib", "idlelib",
"idletime", "idletime",
"idna", "idna",
"infobars",
"Inno", "Inno",
"kdeglobals", "kdeglobals",
"keras", "keras",
@@ -78,6 +79,7 @@
"killall", "killall",
"Kolkata", "Kolkata",
"kreadconfig", "kreadconfig",
"langpack",
"launchservices", "launchservices",
"letterboxing", "letterboxing",
"libatk", "libatk",
@@ -151,6 +153,7 @@
"screeninfo", "screeninfo",
"selectables", "selectables",
"serde", "serde",
"sessionstore",
"setpriority", "setpriority",
"setsid", "setsid",
"SETTINGCHANGE", "SETTINGCHANGE",
+4
View File
@@ -737,6 +737,10 @@ impl Browser for ChromiumBrowser {
"--disable-background-timer-throttling".to_string(), "--disable-background-timer-throttling".to_string(),
"--crash-server-url=".to_string(), "--crash-server-url=".to_string(),
"--disable-updater".to_string(), "--disable-updater".to_string(),
// Disable quit confirmation and session restore prompts
"--disable-session-crashed-bubble".to_string(),
"--hide-crash-restore-bubble".to_string(),
"--disable-infobars".to_string(),
]; ];
// Add remote debugging if requested // Add remote debugging if requested
+6
View File
@@ -1132,6 +1132,12 @@ impl ProfileManager {
"user_pref(\"datareporting.policy.dataSubmissionPolicyBypassNotification\", true);" "user_pref(\"datareporting.policy.dataSubmissionPolicyBypassNotification\", true);"
.to_string(), .to_string(),
"user_pref(\"toolkit.telemetry.reportingpolicy.firstRun\", false);".to_string(), "user_pref(\"toolkit.telemetry.reportingpolicy.firstRun\", false);".to_string(),
// Disable quit confirmation dialogs
"user_pref(\"browser.warnOnQuit\", false);".to_string(),
"user_pref(\"browser.showQuitWarning\", false);".to_string(),
"user_pref(\"browser.tabs.warnOnClose\", false);".to_string(),
"user_pref(\"browser.tabs.warnOnCloseOtherTabs\", false);".to_string(),
"user_pref(\"browser.sessionstore.warnOnQuit\", false);".to_string(),
] ]
} }