mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-04-29 23:27:51 +02:00
refactor: slop cleanup
This commit is contained in:
@@ -136,6 +136,18 @@ impl BrowserRunner {
|
||||
url: Option<String>,
|
||||
local_proxy_settings: Option<&ProxySettings>,
|
||||
) -> Result<BrowserProfile, Box<dyn std::error::Error + Send + Sync>> {
|
||||
// Check if browser is disabled due to ongoing update
|
||||
let auto_updater = crate::auto_updater::AutoUpdater::new();
|
||||
if auto_updater.is_browser_disabled(&profile.browser)? {
|
||||
return Err(
|
||||
format!(
|
||||
"{} is currently being updated. Please wait for the update to complete.",
|
||||
profile.browser
|
||||
)
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
|
||||
// Handle camoufox profiles using nodecar launcher
|
||||
if profile.browser == "camoufox" {
|
||||
if let Some(mut camoufox_config) = profile.camoufox_config.clone() {
|
||||
|
||||
@@ -86,8 +86,8 @@ impl Default for CamoufoxConfig {
|
||||
additional_args: None,
|
||||
env_vars: None,
|
||||
firefox_prefs: None,
|
||||
disable_theming: Some(true), // Required for anti-detect
|
||||
showcursor: Some(false), // Required for anti-detect
|
||||
disable_theming: Some(true),
|
||||
showcursor: Some(false),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -415,7 +415,6 @@ impl CamoufoxNodecarLauncher {
|
||||
args.extend(["--firefox-prefs".to_string(), prefs_json]);
|
||||
}
|
||||
|
||||
// Required anti-detect options
|
||||
if let Some(disable_theming) = config.disable_theming {
|
||||
if disable_theming {
|
||||
args.push("--disable-theming".to_string());
|
||||
|
||||
Reference in New Issue
Block a user