Fix script running inside ad iframes.

This commit is contained in:
ccd0 2016-06-02 00:31:32 -07:00
parent 90a3985ea2
commit 59bac43afb

View File

@ -3,6 +3,9 @@ Main =
# XXX Work around Pale Moon / old Firefox + GM 1.15 bug where script runs in iframe with wrong window.location.
return if d.body and not $ 'title', d.head
# Don't run inside ad iframes.
return if window.frameElement and window.frameElement.src is ''
# XXX dwb userscripts extension reloads scripts run at document-start when replaceState/pushState is called.
return if window['<%= meta.name %> antidup']
window['<%= meta.name %> antidup'] = true