Skip to content

Commit 9235876

Browse files
committed
fix: one of mobile powerlink advert variants
1 parent b5d4952 commit 9235876

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

userscript/source/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ export async function RunNamuLinkUserscript(BrowserWindow: typeof window, Usersc
5555

5656
ArticleHTMLElement.addEventListener('vue:settled', async () => {
5757
let Targeted = [...document.querySelectorAll('#app div[class] div[class] ~ div[class]')].filter(Ele => Ele instanceof HTMLElement)
58-
Targeted = Targeted.filter(Ele => parseFloat(getComputedStyle(Ele).getPropertyValue('padding-top')) >= 20 || parseFloat(getComputedStyle(Ele).getPropertyValue('margin-top')) >= 20)
58+
Targeted = Targeted.filter(Ele =>
59+
parseFloat(getComputedStyle(Ele).getPropertyValue('padding-top')) >= 20 ||
60+
parseFloat(getComputedStyle(Ele).getPropertyValue('margin-top')) >= 20 ||
61+
parseFloat(getComputedStyle(Ele).getPropertyValue('margin-bottom')) >= 12.5
62+
)
5963
Targeted = Targeted.filter(Ele => [...Ele.querySelectorAll('*')].filter(Child =>
6064
parseFloat(getComputedStyle(Child).getPropertyValue('padding-top')) >= 5 && parseFloat(getComputedStyle(Child).getPropertyValue('border-bottom-width')) >= 0.1
6165
).length === 1)

0 commit comments

Comments
 (0)