Repository: darkreader/darkreader (ts)

Issue:
White background flashing when opening a web page
White background flashing when opening a web page
Although very short, it is too bright. Can it be turned into night mode?

White flash between page loads
When dark reader is turned on and installed into Firefox, there are white page load flashes between page loads where the all white default background is exposed before renders.
These flashes combined with dark reader have been giving me migraines as the page flip flops from over exposed bright white light to the mode dark reader creates when it does it's thing.

Is there any way dark reader could do something like change the default background in Firefox so that this flash does not occur?
It's really annoying.
Thanks. Great plugin BTW.
Version 4.8.8 white flash on page loads on Firefox
Dark Reader version: 4.8.8
Firefox version: 72.0.2 (64-bit)

**How to reproduce:**

1. Go to google.com
2. Refresh page

**What is expected to happen:**

Dark mode should load automatically.

**What actually happens:**

Non-dark mode blinds you for some milliseconds, before dark mode takes place.
[Broken Website]  white flash on git.sr.ht

<!--
Thank you for taking the time to report a broken website.
Please make sure there is no existing issue about this broken website.
-->

**Website**
https://git.sr.ht and all hosted projects on it, e.g. https://git.sr.ht/~cadence/bibliogram
**How to Reproduce**
Steps to reproduce the behavior:
An example of this is
1. Go to the bibliogram project (2nd link) or any other project you know on git.sr.ht
2. Browse the website by clicking on links

**Expected behavior**
The page is dark instantly

**Actual behavior**
The page is dark after about one second

<!--
Please add a version of the browser you are using. 
If you don't know how to get your browser/darkreader version please search it up online.
-->
**System info:**
 - OS: Android
 - Browser: Firefox nightly
 - Darkreader Version: 4.9.16
 
**Additional context**
This is not related to mozilla-mobile/fenix#6313 which only happens when you load a website in a new tab. Except this first white flash which is due to a browser bug, there are no other white flashes on any website when you browse it **in the same tab** (not using a new tab). But on git.sr.ht it happens, therefore I think it's a darkreader bug.
[BUG] Lightmode for a split second while loading a page
<!--
Thank you for taking the time to report a bug.
Please make sure there is no existing issue about this kind of bug.
-->

### **Describe the bug**

While loading a new page, even on the same webite that has dark mode set, the page may go white mode for a split second, resulting in a very clear flash of glaring white.

### **Steps to reproduce**

- Browse around on, for example, Github.

### **Expected behavior**

Always stay darkmode if darkmode is enabled.

### **Actual behavior**

A flash of white, sometimes, when loading a page.


<!--
Please add a version of the browser you are using. 
If you don't know how to get your browser/darkreader version please search it up online.
-->
### **System Information:**
 - OS: Windows 10
 - Browser: Firefox 79
 - Dark Reader version: 4.9.16


Pull request description:
Prevent whiteflash on inital document_start
- Adds a whiteflash killer style on document_start instead of checking all variables and do go trough functions.
- Adds fallback style a lot earlier to prevent white flash.
- Resolves #3523
- Resolves #1219 
- Resolves #3307 
- Resolves #1965
- Resolves #695

**DISCLAMER: HOWEVER THERE CAN BE STILL CASES WITH A WHITE FLASH CAN HAPPEN, THIS IS CAN BE HARD TO FIX AS DARK READER'S FIRST THING EXECUTING IS TO PREVENT THIS. IF THERE ARE 100% REPRODUCE ABLE CASES, OPEN UP A ISSUE WITH INFORMATION AND NO HATE AND DISRESPECT**

Even on a high-end system I noticed a nice white flash, however with this I didn't notice it. Also chrome has a nice feature to reduce memory usage and free memory of unused sites and give a even longer whiteflash, not sure how to fix that or if chrome need to do some magic to make sure to get it's dark-ish color.

Patch:
diff --git a/src/background/extension.ts b/src/background/extension.ts
index db636704..b081962e 100644
--- a/src/background/extension.ts
+++ b/src/background/extension.ts
@@ -207,11 +207,11 @@ export class Extension {
 
     private getConnectionMessage(url, frameURL) {
         if (this.ready) {
-            return this.isEnabled() && this.getTabMessage(url, frameURL);
+            return this.getTabMessage(url, frameURL);
         } else {
             return new Promise((resolve) => {
                 this.awaiting.push(() => {
-                    resolve(this.isEnabled() && this.getTabMessage(url, frameURL));
+                    resolve(this.getTabMessage(url, frameURL));
                 });
             });
         }
@@ -364,7 +364,7 @@ export class Extension {
     private getURLInfo(url: string): TabInfo {
         const {DARK_SITES} = this.config;
         const isInDarkList = isURLInList(url, DARK_SITES);
-        const isProtected = !(this.user.settings.enableForProtectedPages || canInjectScript(url));
+        const isProtected = !canInjectScript(url);
         return {
             url,
             isInDarkList,
@@ -425,9 +425,9 @@ export class Extension {
                     throw new Error(`Unknown engine ${theme.engine}`);
                 }
             }
-        } else {
-            console.log(`Site is not inverted: ${url}`);
         }
+
+        console.log(`Site is not inverted: ${url}`);
         return {
             type: 'clean-up',
         };
diff --git a/src/config/dark-sites.config b/src/config/dark-sites.config
index 9dac8901..8215dfc6 100644
--- a/src/config/dark-sites.config
+++ b/src/config/dark-sites.config
@@ -125,6 +125,7 @@ daringfireball.net
 dark.diatr.us
 darkmodelist.com
 darkreader.org
+datomatic.no-intro.org
 dcards.snaz.in
 deepweblinks.net
 del.dog
@@ -224,6 +225,7 @@ game-debate.com
 gamebanana.com
 gamejolt.com
 gameloop.fun
+garamlee500.github.io
 gatsbyjs.org
 geekabit.nl
 geektyper.com
@@ -240,6 +242,7 @@ giantbomb.com
 gibber.cc
 gidonline.in
 gifrun.com
+gifyourgame.com
 gikken.co
 giphy.com
 gitkraken.com
@@ -331,6 +334,7 @@ lecantiche.com
 letterboxd.com
 lightweightpdf.com
 linux.org.ru
+liquidplus.com
 lollilol.cf
 lollilol.ml
 lookmovie.ag
@@ -448,6 +452,7 @@ pr0gramm.com
 pre.fyp.nl
 premid.app
 primevideo.com
+progettosnaps.net
 protogen.dev
 protondb.com
 proxx.app
diff --git a/src/config/dynamic-theme-fixes.config b/src/config/dynamic-theme-fixes.config
index 6ca614f3..247b211e 100644
--- a/src/config/dynamic-theme-fixes.config
+++ b/src/config/dynamic-theme-fixes.config
@@ -899,6 +899,13 @@ CSS
 
 ================================
 
+chess.com
+
+IGNORE IMAGE ANALYSIS
+.piece
+
+================================
+
 chilkatsoft.com
 
 CSS
@@ -1704,6 +1711,15 @@ CSS
 
 ================================
 
+enduhub.com
+
+CSS
+.navbar .nav > li > a {
+    text-shadow: rgb(40, 43, 54) 0px 1px 0px !important;
+}
+
+================================
+
 enjen.net
 
 CSS
@@ -1726,6 +1742,22 @@ INVERT
 
 ================================
 
+eshot.gov.tr
+
+CSS
+a.navbar-brand img {
+    filter: hue-rotate(90deg) invert(1) hue-rotate(90deg) saturate(15);
+}
+#heading .left, #heading .sub-menu .left-xs, #heading .sub-menu .right-xs {
+    background-color: transparent !important;
+    background-image: none !important;
+}
+section#announcements-area .container {
+    background-image: none;
+}
+
+================================
+
 etsy.com
 
 INVERT
@@ -1985,6 +2017,9 @@ div.drm-container svg g
 
 fandom.com
 
+INVERT
+.wds-global-navigation__logo-fandom
+
 IGNORE INLINE STYLE
 .wds-global-navigation__logo-image g path
 .wds-global-footer__header-logo g path
@@ -2075,6 +2110,15 @@ img[src$="assets/images/bg-cloud.png"]
 
 ================================
 
+filmweb.pl
+
+CSS
+.filmInfo__info {
+    color: var(--darkreader-neutral-text) !important;
+}
+
+================================
+
 filterlists.com
 
 IGNORE INLINE STYLE
@@ -2439,6 +2483,23 @@ IGNORE IMAGE ANALYSIS
 
 ================================
 
+gls-pakete.de
+
+CSS
+.tracking--status .status-box::before, .tracking--status .status-box::after {
+    z-index: 0 !important;
+}
+
+.tracking--status .status-box.status--complete.status--lastcomplete .status-box--tooltip, .tracking--status .status-box.status--current .status-box--tooltip {
+    transform: none !important;
+    position: absolute !important;
+    margin-bottom: 0px !important;
+    margin-top: -10px !important;
+    bottom: 0 !important;
+}
+
+================================
+
 gnu.org
 
 INVERT
@@ -3139,6 +3200,11 @@ INVERT
 .CodeMirror-cursor
 .user-story-chapter-base .companies-showcase-base .logo
 
+CSS
+[class^=question-picker-detail] {
+    background: none !important;
+}
+
 ================================
 
 lenovo.com
@@ -3480,6 +3546,15 @@ CSS
 
 ================================
 
+matters.news
+
+CSS
+section[class$="container"][style^="background-image"] {
+    background-image: none !important;
+}
+
+================================
+
 medium.com
 
 INVERT
@@ -3527,6 +3602,15 @@ CSS
 
 ================================
 
+meituan.com
+
+INVERT
+.dpLogo
+.header-title
+.site-logo
+
+================================
+
 messages.android.com
 
 INVERT
@@ -3976,18 +4060,6 @@ CSS
 
 ================================
 
-nvidia.com
-
-INVERT
-.global-footer__logo
-
-CSS
-.brand-link.pull-left {
-    filter: invert(1) hue-rotate(170deg) brightness(4);
-}
-
-================================
-
 nvidia.com
 nvidia.in
 
@@ -4240,6 +4312,13 @@ div[dir="ltr", id="map"] {
 
 ================================
 
+openwall.com
+
+INVERT
+.logo
+
+================================
+
 overleaf.com
 
 INVERT
@@ -4664,6 +4743,14 @@ CSS
 
 ================================
 
+rottentomatoes.com
+
+IGNORE IMAGE ANALYSIS
+.icon__fresh
+.fresh
+
+================================
+
 rubjo.github.io
 
 CSS
@@ -4816,6 +4903,13 @@ svg.server-pro-logo
 
 ================================
 
+servercat.net
+
+INVERT
+.theme-header-logo
+
+================================
+
 share.dmhy.org
 
 CSS
@@ -5010,6 +5104,13 @@ CSS
 
 ================================
 
+sso.qiniu.com
+
+INVERT
+.navbar-brand
+
+================================
+
 stardewvalleywiki.com
 
 CSS
@@ -5386,6 +5487,7 @@ theguardian.com
 
 INVERT
 .inline-the-guardian-logo__svg
+a[data-link-name$="logo"] > svg
 
 ================================
 
@@ -6559,6 +6661,13 @@ IGNORE INLINE STYLE
 
 ================================
 
+www.jiqizhixin.com
+
+INVERT
+.header__logo
+
+================================
+
 www.realtek.com
 
 CSS
@@ -6938,6 +7047,15 @@ CSS
 
 ================================
 
+zdic.net
+
+CSS
+.zisong img {
+    background-color: ${black} !important;
+}
+
+================================
+
 zeptovm.com
 
 INVERT
diff --git a/src/config/inversion-fixes.config b/src/config/inversion-fixes.config
index 5900c92d..3ec281c4 100644
--- a/src/config/inversion-fixes.config
+++ b/src/config/inversion-fixes.config
@@ -749,6 +749,23 @@ pre code {
 
 ================================
 
+gls-pakete.de
+
+CSS
+.tracking--status .status-box::before, .tracking--status .status-box::after {
+    z-index: 0 !important;
+}
+
+.tracking--status .status-box.status--complete.status--lastcomplete .status-box--tooltip, .tracking--status .status-box.status--current .status-box--tooltip {
+    transform: none !important;
+    position: absolute !important;
+    margin-bottom: 0px !important;
+    margin-top: -10px !important;
+    bottom: 0 !important;
+}
+
+================================
+
 google.*
 google.*.*
 
diff --git a/src/inject/dynamic-theme/css-collection.ts b/src/inject/dynamic-theme/css-collection.ts
index abb97dcd..21ea0aad 100644
--- a/src/inject/dynamic-theme/css-collection.ts
+++ b/src/inject/dynamic-theme/css-collection.ts
@@ -39,7 +39,7 @@ export async function collectCSS() {
     const css = [banner];
 
     function addStaticCSS(selector: string, comment: string) {
-        const staticStyle = document.head.querySelector(selector);
+        const staticStyle = document.querySelector(selector);
         if (staticStyle && staticStyle.textContent) {
             css.push(`/* ${comment} */`);
             css.push(staticStyle.textContent);
diff --git a/src/inject/dynamic-theme/index.ts b/src/inject/dynamic-theme/index.ts
index 8a03cd16..69b6932c 100644
--- a/src/inject/dynamic-theme/index.ts
+++ b/src/inject/dynamic-theme/index.ts
@@ -49,7 +49,7 @@ function stopStylePositionWatchers() {
 }
 
 function createStaticStyleOverrides() {
-    const fallbackStyle = createOrUpdateStyle('darkreader--fallback');
+    const fallbackStyle = createOrUpdateStyle('darkreader--fallback', document);
     fallbackStyle.textContent = getModifiedFallbackStyle(filter, {strict: true});
     document.head.insertBefore(fallbackStyle, document.head.firstChild);
     setupStylePositionWatcher(fallbackStyle, 'fallback');
@@ -131,7 +131,7 @@ function replaceCSSTemplates($cssText: string) {
 }
 
 function cleanFallbackStyle() {
-    const fallback = document.head.querySelector('.darkreader--fallback');
+    const fallback = document.querySelector('.darkreader--fallback');
     if (fallback) {
         fallback.textContent = '';
     }
diff --git a/src/inject/fallback.ts b/src/inject/fallback.ts
new file mode 100644
index 00000000..a3eb38a1
--- /dev/null
+++ b/src/inject/fallback.ts
@@ -0,0 +1,11 @@
+if (
+    matchMedia('(prefers-color-scheme: dark)').matches &&
+    !document.querySelector('.darkreader--fallback')
+) {
+    const fallbackStyle = document.createElement('style');
+    fallbackStyle.textContent = 'html, body, body :not(iframe) { background-color: #181a1b !important; border-color: #776e62 !important; color: #e8e6e3 !important; }';
+    document.documentElement.appendChild(fallbackStyle);
+    fallbackStyle.classList.add('darkreader');
+    fallbackStyle.classList.add('darkreader--fallback');
+    fallbackStyle.media = 'screen';
+}
diff --git a/src/manifest.json b/src/manifest.json
index 70f6c82d..b13b5d54 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -28,6 +28,7 @@
                 "<all_urls>"
             ],
             "js": [
+                "inject/fallback.js",
                 "inject/index.js"
             ],
             "run_at": "document_start",
diff --git a/src/ui/controls/shortcut/index.tsx b/src/ui/controls/shortcut/index.tsx
index 27ca0b8c..c00474c2 100644
--- a/src/ui/controls/shortcut/index.tsx
+++ b/src/ui/controls/shortcut/index.tsx
@@ -1,6 +1,6 @@
 import {m} from 'malevic';
 import {mergeClass} from '../utils';
-import {isFirefox} from '../../../utils/platform';
+import {isFirefox, isEdge} from '../../../utils/platform';
 import {Shortcuts} from '../../../definitions';
 
 interface ShortcutLinkProps {
@@ -83,6 +83,13 @@ export default function ShortcutLink(props: ShortcutLinkProps) {
             startEnteringShortcut(e.target as HTMLAnchorElement);
             return;
         }
+        if (isEdge()) {
+            chrome.tabs.create({
+                url: `edge://extensions/shortcuts`,
+                active: true
+            });
+            return;
+        }
         chrome.tabs.create({
             url: `chrome://extensions/configureCommands#command-${chrome.runtime.id}-${props.commandName}`,
             active: true
diff --git a/src/ui/icons.less b/src/ui/icons.less
index 1c5e39ef..7faabb22 100644
--- a/src/ui/icons.less
+++ b/src/ui/icons.less
@@ -1,6 +1,8 @@
+@icon-escaped-color: escape(@color-control-fore-inactive);
 @icon-check: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="white" d="M0,4 l2,2 l5,-5 v1.5 l-5,5 l-2,-2 z"/></svg>');
-@icon-cross-escaped-color: escape(@color-control-fore-inactive);
-@icon-cross: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="@{icon-cross-escaped-color}" d="M1,0.5 l6,6 v1.5 l-6,-6 Z M1,6.5 l6,-6 v1.5 l-6,6 z"/></svg>');
+@icon-close: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="none" stroke="white" stroke-width="1" d="M1,1 l6,6 M1,7 l6,-6"/></svg>');
+@icon-close-inactive: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="none" stroke="@{icon-escaped-color}" stroke-width="1" d="M1,1 l6,6 M1,7 l6,-6"/></svg>');
+@icon-cross: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="@{icon-escaped-color}" d="M1,0.5 l6,6 v1.5 l-6,-6 Z M1,6.5 l6,-6 v1.5 l-6,6 z"/></svg>');
 @icon-down: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="white" d="M1,2 l3,3 l3,-3 v1.5 l-3,3 l-3,-3 z"/></svg>');
 @icon-left: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="white" d="M6,1 h-1.5 l-3,3 l3,3 h1.5 l-3,-3 z"/></svg>');
 @icon-list: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path fill="white" d="M0,0 h1 v1 h-1 z m2,0 h6 v1 h-6 z m-2,3.25 h1 v1 h-1 z m2,0 h6 v1 h-6 z m-2,3.25 h1 v1 h-1 z m2,0 h6 v1 h-6 z"/></svg>');
diff --git a/src/ui/popup/components/site-toggle/index.tsx b/src/ui/popup/components/site-toggle/index.tsx
index 23d423dc..247207a3 100644
--- a/src/ui/popup/components/site-toggle/index.tsx
+++ b/src/ui/popup/components/site-toggle/index.tsx
@@ -14,7 +14,7 @@ export default function SiteToggleButton({data, tab, actions}: ExtWrapper & {tab
         }
     }
     const toggleHasEffect = (
-        data.isEnabled &&
+        data.settings.enableForProtectedPages || 
         !tab.isProtected
     );
     const pdf = isPDF(tab.url);
diff --git a/src/ui/popup/site-list-page/site-list.tsx b/src/ui/popup/site-list-page/site-list.tsx
index bf1a10b1..a4987168 100644
--- a/src/ui/popup/site-list-page/site-list.tsx
+++ b/src/ui/popup/site-list-page/site-list.tsx
@@ -55,6 +55,15 @@ export default function SiteList(props: SiteListProps) {
         props.onChange(values);
     }
 
+    function removeValue(event: MouseEvent) {
+        const previousSibling = ((event.target as HTMLInputElement).previousSibling as HTMLInputElement);
+        const index = store.indices.get(previousSibling);
+        const filtered = props.siteList.slice();
+        filtered.splice(index, 1);
+        store.shouldFocusAtIndex = index;
+        props.onChange(filtered);
+    }
+
     function createTextBox(text: string, index: number) {
         const onRender = (node: HTMLInputElement) => {
             store.indices.set(node, index);
@@ -64,12 +73,19 @@ export default function SiteList(props: SiteListProps) {
             }
         };
         return (
-            <TextBox
-                class="site-list__textbox"
-                value={text}
-                onrender={onRender}
-                placeholder="google.com/maps"
-            />
+            <div class="site-list__item">
+                <TextBox
+                    class="site-list__textbox"
+                    value={text}
+                    onrender={onRender}
+                    placeholder="google.com/maps"
+                />
+                <span
+                    class="site-list__item__remove"
+                    role="button"
+                    onclick={removeValue}
+                />
+            </div>
         );
     }
 
diff --git a/src/ui/popup/site-list-page/style.less b/src/ui/popup/site-list-page/style.less
index 606d48c5..8d7cdd4e 100644
--- a/src/ui/popup/site-list-page/style.less
+++ b/src/ui/popup/site-list-page/style.less
@@ -1,4 +1,5 @@
 @import "../../theme.less";
+@import "../../icons.less";
 
 .site-list-page {
     align-items: center;
@@ -45,4 +46,33 @@
             z-index: 1;
         }
     }
+
+    &__item {
+        position: relative;
+
+        &__remove {
+            background-color: transparent;
+            background-image: @icon-close-inactive;
+            background-position: center;
+            background-repeat: no-repeat;
+            background-size: 0.75rem;
+            border-radius: 50%;
+            cursor: pointer;
+            display: none;
+            height: 1.25rem;
+            position: absolute;
+            right: 0.125rem;
+            top: 0.125rem;
+            width: 1.25rem;
+
+            &:hover {
+                background-color: @color-control-active;
+                background-image: @icon-close;
+            }
+        }
+
+        &:hover .site-list__item__remove {
+            display: inline-block;
+        }
+    }
 }
diff --git a/src/utils/url.ts b/src/utils/url.ts
index 7470ce7d..3ffc5fb9 100644
--- a/src/utils/url.ts
+++ b/src/utils/url.ts
@@ -137,7 +137,7 @@ export function isPDF(url: string) {
 }
 
 export function isURLEnabled(url: string, userSettings: UserSettings, {isProtected, isInDarkList}) {
-    if (isProtected && userSettings.enableForProtectedPages) {
+    if (isProtected && !userSettings.enableForProtectedPages) {
         return false;
     }
     if (isPDF(url) && userSettings.enableForPDF) {
diff --git a/tasks/bundle-js.js b/tasks/bundle-js.js
index 1f6cfe1d..8a7aed2a 100644
--- a/tasks/bundle-js.js
+++ b/tasks/bundle-js.js
@@ -59,6 +59,15 @@ const jsEntries = [
         },
         watchFiles: null,
     },
+    {
+        src: 'src/inject/fallback.ts',
+        dest: 'inject/fallback.js',
+        reloadType: reload.FULL,
+        async postBuild({debug}) {
+            await copyToFF({cwdPath: this.dest, debug});
+        },
+        watchFiles: null,
+    },
     {
         src: 'src/ui/devtools/index.tsx',
         dest: 'ui/devtools/index.js',


Test patch:
diff --git a/tests/utils/url.tests.ts b/tests/utils/url.tests.ts
index 743b107f..7ab7a334 100644
--- a/tests/utils/url.tests.ts
+++ b/tests/utils/url.tests.ts
@@ -66,12 +66,12 @@ test('URL is enabled', () => {
         'https://chrome.google.com/webstore',
         {siteList: ['chrome.google.com'], siteListEnabled: [], applyToListedOnly: true, enableForProtectedPages: true} as UserSettings,
         {isProtected: true, isInDarkList: false},
-    )).toBe(false);
+    )).toBe(true);
     expect(isURLEnabled(
         'https://chrome.google.com/webstore',
         {siteList: [], siteListEnabled: [], applyToListedOnly: false, enableForProtectedPages: false} as UserSettings,
         {isProtected: true, isInDarkList: false},
-    )).toBe(true);
+    )).toBe(false);
     expect(isURLEnabled(
         'https://chrome.google.com/webstore',
         {siteList: ['chrome.google.com'], siteListEnabled: [], applyToListedOnly: false, enableForProtectedPages: true} as UserSettings,
@@ -86,7 +86,7 @@ test('URL is enabled', () => {
         'https://microsoftedge.microsoft.com/addons',
         {siteList: ['microsoftedge.microsoft.com'], siteListEnabled: [], applyToListedOnly: true, enableForProtectedPages: true} as UserSettings,
         {isProtected: true, isInDarkList: false},
-    )).toBe(false);
+    )).toBe(true);
     expect(isURLEnabled(
         'https://duckduckgo.com',
         {siteList: [], siteListEnabled: [], applyToListedOnly: false, enableForProtectedPages: true} as UserSettings,