From eba6cad429bc643f2d290188484f65f1adeae270 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 23 Jun 2015 13:14:59 -0700 Subject: [PATCH] Work around dwb re-running script bug. --- src/General/Main.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 108e9b43d..c68ab3bf9 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -1,5 +1,9 @@ Main = init: -> + # 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 + if location.hostname is 'www.google.com' if location.pathname is '/recaptcha/api/noscript' $.ready -> Captcha.noscript.initFrame()