Skip to content

Commit

Permalink
Fix: allowListed first check as isGoogleURL & edit order & descriptio…
Browse files Browse the repository at this point in the history
…n of preferences
  • Loading branch information
situplastik committed Jan 11, 2021
1 parent 24f88bc commit 5f30187
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
14 changes: 5 additions & 9 deletions background.js
Expand Up @@ -343,7 +343,11 @@ function shouldContainInto (url, tab) {
return false;
}

let handleUrl = isGoogleURL(url);
let handleUrl = isGoogleURL(url) || (extensionSettings.allowlist.length!=0 && isAllowlistedURL(url));

if (handleUrl && extensionSettings.whitelist.length!=0 && isWhitelistedURL(url)) {
handleUrl = false;
}

if (handleUrl && extensionSettings.ignore_youtube && isYouTubeURL(url)) {
handleUrl = false;
Expand All @@ -369,14 +373,6 @@ function shouldContainInto (url, tab) {
handleUrl = false;
}

if (handleUrl && extensionSettings.whitelist.length!=0 && isWhitelistedURL(url)) {
handleUrl = false;
}

if (!handleUrl && extensionSettings.allowlist.length!=0 && isAllowlistedURL(url)) {
handleUrl = true;
}

if (handleUrl) {
if (tab.cookieStoreId !== googleCookieStoreId) {
if (tab.cookieStoreId !== "firefox-default" && extensionSettings.dont_override_containers) {
Expand Down
8 changes: 4 additions & 4 deletions options.html
Expand Up @@ -64,20 +64,20 @@ <h1>Settings</h1>

<p>
<label>
<textarea id="whitelist" value="" cols="80">
<textarea id="allowlist" value="" cols="80">
</textarea>
<br>
Whitelisted google urls<br>
Allowlisted urls to use Google Container (for example third party SSO)<br>
<em>(Use one url per line.)</em>
</label>
</p>

<p>
<label>
<textarea id="allowlist" value="" cols="80">
<textarea id="whitelist" value="" cols="80">
</textarea>
<br>
Allowlisted urls to use Google Container<br>
Whitelisted urls (Google or allowlisted)<br>
<em>(Use one url per line.)</em>
</label>
</p>
Expand Down

0 comments on commit 5f30187

Please sign in to comment.