From 30ec6abba04e1a1b489d39326f4e6300f9fec599 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Mon, 11 Mar 2024 21:44:46 -0300 Subject: [PATCH 1/4] fix: resolve issue when using ad-blocking extensions blocks entire page (#375) --- src/contentScripts/views/App.vue | 6 ++++-- src/styles/blockAds.scss | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index e35a6a9d..394bb48c 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -254,10 +254,12 @@ function handleOsScroll() { } function handleBlockAds() { + // Do not use the "ads" keyword. AdGuard, AdBlock, and some ad-blocking extensions will + // detect and remove it when the class name contains "ads" if (settings.value.blockAds) - document.documentElement.classList.add('block-ads') + document.documentElement.classList.add('block-useless-contents') else - document.documentElement.classList.remove('block-ads') + document.documentElement.classList.remove('block-useless-contents') } function handleDisableFrostedGlass() { diff --git a/src/styles/blockAds.scss b/src/styles/blockAds.scss index 3046d6a1..71778e9d 100644 --- a/src/styles/blockAds.scss +++ b/src/styles/blockAds.scss @@ -1,4 +1,6 @@ -.block-ads { +// Do not use the "ads" keyword. AdGuard, AdBlock, and some ad-blocking extensions will +// detect and remove it when the class name contains "ads" +.block-useless-contents { // 原版首頁最右則推介內容 .floor-single-card, // 首頁不能使用不感興趣的影片都當廣告殺了 @@ -16,7 +18,7 @@ } // 首頁推介頂部卡片間距調整 - .recommended-container_floor-aside .container>*:nth-of-type(n + 8) { + .recommended-container_floor-aside .container > *:nth-of-type(n + 8) { margin-top: 0px !important; margin-bottom: 24px; } From bf7309d320c855aaab516e26086b76dd5492c5e1 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Mon, 11 Mar 2024 21:51:44 -0300 Subject: [PATCH 2/4] fix(TopBar): moments icon badges show the 0 (#376) --- src/components/TopBar/TopBar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TopBar/TopBar.vue b/src/components/TopBar/TopBar.vue index 7f7bc910..43f1e622 100644 --- a/src/components/TopBar/TopBar.vue +++ b/src/components/TopBar/TopBar.vue @@ -452,7 +452,7 @@ defineExpose({ @mouseenter="showNotificationsPop = true" @mouseleave="showNotificationsPop = false" > -