mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
fix: resolve issue when using ad-blocking extensions blocks entire page (#375)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user