mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
autocontainmode: "strict" | "relaxed"
The prior (and still default) autocontain behaviour is to intercept all page loads that match an aucon pattern, and may even replace a tab to do so. "relaxed" mode is introduced here as a way to only apply the rules when opening a new tab.
This commit is contained in:
parent
2f28555ac6
commit
fec571d748
2 changed files with 10 additions and 0 deletions
|
@ -77,6 +77,9 @@ export class AutoContain implements IAutoContain {
|
|||
): Promise<browser.webRequest.BlockingResponse> => {
|
||||
if (!this.autocontainConfigured()) return { cancel: false }
|
||||
|
||||
// Only handle in strict mode.
|
||||
if (Config.get("autocontainmode") === "relaxed") return { cancel: false }
|
||||
|
||||
// Only handle http requests.
|
||||
if (details.url.search("^https?://") < 0) return { cancel: false }
|
||||
|
||||
|
|
|
@ -439,6 +439,13 @@ export class default_config {
|
|||
// "youtube.com": "google",
|
||||
})
|
||||
|
||||
/**
|
||||
* Strict mode will always ensure a domain is open in the correct container, replacing the current tab if necessary.
|
||||
*
|
||||
* Relaxed mode is less aggressive and instead treats container domains as a default when opening a new tab.
|
||||
*/
|
||||
autocontainmode: "strict" | "relaxed" = "strict"
|
||||
|
||||
/**
|
||||
* Aliases for the commandline.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue