Use beforescriptexecute where available to kill unwanted scripts.

This commit is contained in:
ccd0 2016-02-09 01:49:40 -08:00
parent 4a5d77b5ca
commit f6da9b789b

View File

@ -24,6 +24,9 @@ Main =
for prop in ['atOptions', 'adsterra_key', 'EpmadsConfig', 'epmads_key', 'EpomConfig', 'epom_key', 'exoDocumentProtocol']
nuke window, prop
return
$.on window, 'beforescriptexecute', (e) ->
host = e.target.src.split('/')[2]?.match(/[^.]+\.[^.]+$/)?[0]
e.preventDefault() if host in ['bnhtml.com', 'ecpmrocks.com', 'advertisation.com', 'exoclick.com']
# Detect multiple copies of 4chan X
$.on d, '4chanXInitFinished', ->