Skip to content

Commit 46a5dbe

Browse files
committed
fix: incorrectly blocked a person's profile
1 parent 13153d3 commit 46a5dbe

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

userscript/source/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ export async function RunNamuLinkUserscript(BrowserWindow: typeof window, Usersc
105105
parseFloat(getComputedStyle(Child).getPropertyValue('border-top-width')) >= 0.25 && parseFloat(getComputedStyle(Child).getPropertyValue('border-bottom-width')) >= 0.25
106106
})
107107
})
108+
Targeted = Targeted.filter(Ele => {
109+
let Rect = Ele.getBoundingClientRect()
110+
return Rect.width / Rect.height <= 1
111+
})
108112
Targeted = await ExecuteOCR(Targeted)
109113
Targeted.forEach(Ele => Targeted.push(...new Set([...Ele.querySelectorAll('*')].filter(Child => Child instanceof HTMLElement))))
110114
Targeted = [...new Set(Targeted)]

0 commit comments

Comments
 (0)