From 2a8bf2adb0737ce7bb1e21f6b959e4c6e1de1bc7 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 26 Feb 2023 19:38:47 -0800 Subject: [PATCH] Disable Javascript Whitelist on captcha iframe. #3292 --- src/main/Main.coffee | 1 + src/site/SW.yotsuba.coffee | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/Main.coffee b/src/main/Main.coffee index cc0ef0aef..3d740c469 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -88,6 +88,7 @@ Main = if ( /\.4chan(?:nel)?\.org$/.test(location.hostname) and !SW.yotsuba.regexp.pass.test(location.href) and + !SW.yotsuba.regexp.captcha.test(location.href) and !$$('script:not([src])', d).filter((s) -> /this\[/.test(s.textContent)).length ) ($.getSync or $.get) {'jsWhitelist': Conf['jsWhitelist']}, ({jsWhitelist}) -> diff --git a/src/site/SW.yotsuba.coffee b/src/site/SW.yotsuba.coffee index d706775ea..4c1eadab3 100644 --- a/src/site/SW.yotsuba.coffee +++ b/src/site/SW.yotsuba.coffee @@ -103,6 +103,8 @@ SW.yotsuba = /]*\bhref="(?:(?:\/\/boards\.4chan(?:nel)?\.org)?\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g pass: /^https?:\/\/www\.4chan(?:nel)?\.org\/+pass(?:$|[?#])/ + captcha: + /^https?:\/\/sys\.4chan(?:nel)?\.org\/+captcha(?:$|[?#])/ bgColoredEl: -> $.el 'div', className: 'reply'