This commit is contained in:
doms9 2026-03-02 00:16:08 -05:00
parent 8cce8ad100
commit 00000d99d6

View file

@ -115,8 +115,13 @@ class Network:
return
@staticmethod
@cache
@staticmethod
def stealth_js() -> str:
return (Path(__file__).parent / "stealth.js").read_text(encoding="utf-8")
@cache
@staticmethod
def blocked_domains() -> list[str]:
return (
(Path(__file__).parent / "easylist.txt")
@ -172,7 +177,7 @@ class Network:
),
)
await context.add_init_script(path=Path(__file__).parent / "stealth.js")
await context.add_init_script(script=Network.stealth_js())
await context.route("**/*", Network._adblock)