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; }