Disable JS whitelist if 4chan X loads too late for it to be effective.
This commit is contained in:
parent
6e2c93e09e
commit
e08bbdb282
@ -78,7 +78,7 @@ Main =
|
||||
Conf['Toggleable Thread Watcher'] = true
|
||||
|
||||
# Enforce JS whitelist
|
||||
if /\.4chan\.org$/.test(location.hostname)
|
||||
if /\.4chan\.org$/.test(location.hostname) and !$$('script:not([src])', d).filter((s) -> /this\[/.test(s.textContent)).length
|
||||
($.getSync or $.get) {'jsWhitelist': Conf['jsWhitelist']}, ({jsWhitelist}) ->
|
||||
$.addCSP "script-src #{jsWhitelist.replace(/^#.*$/mg, '').replace(/[\s;]+/g, ' ').trim()}"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user