Port: Disable Javascript Whitelist on captcha iframe. #3292
from 2a8bf2adb0737ce7bb1e21f6b959e4c6e1de1bc7
This commit is contained in:
parent
cae0fa5a0b
commit
6381ae463b
@ -207,6 +207,7 @@ var Main = {
|
||||
if (
|
||||
/\.4chan(?:nel)?\.org$/.test(location.hostname) &&
|
||||
!SW.yotsuba.regexp.pass.test(location.href) &&
|
||||
!SW.yotsuba.regexp.captcha.test(location.href) &&
|
||||
!$$('script:not([src])', d).filter(s => /this\[/.test(s.textContent)).length
|
||||
) {
|
||||
($.getSync || $.get)({'jsWhitelist': Conf['jsWhitelist']}, ({jsWhitelist}) => $.addCSP(`script-src ${jsWhitelist.replace(/^#.*$/mg, '').replace(/[\s;]+/g, ' ').trim()}`));
|
||||
|
||||
@ -139,7 +139,9 @@ $\
|
||||
quotelinkHTML:
|
||||
/<a [^>]*\bhref="(?:(?:\/\/boards\.4chan(?:nel)?\.org)?\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g,
|
||||
pass:
|
||||
/^https?:\/\/www\.4chan(?:nel)?\.org\/+pass(?:$|[?#])/
|
||||
/^https?:\/\/www\.4chan(?:nel)?\.org\/+pass(?:$|[?#])/,
|
||||
captcha:
|
||||
/^https?:\/\/sys\.4chan(?:nel)?\.org\/+captcha(?:$|[?#])/,
|
||||
},
|
||||
|
||||
bgColoredEl() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user