Skip to content

Commit

Permalink
Disable Javascript Whitelist on captcha iframe. ccd0#3292
Browse files Browse the repository at this point in the history
  • Loading branch information
ccd0 committed Feb 27, 2023
1 parent f5712a8 commit 2a8bf2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/Main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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}) ->
Expand Down
2 changes: 2 additions & 0 deletions src/site/SW.yotsuba.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ SW.yotsuba =
/<a [^>]*\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'
Expand Down

0 comments on commit 2a8bf2a

Please sign in to comment.