diff --git a/builds/crx/script.js b/builds/crx/script.js index 584f1fe19..9d44de773 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12173,14 +12173,15 @@ } }, popstate: function() { - return Navigate.popstate = function() { + $.off(window, 'popstate', Navigate.popstate); + return $.on(window, 'popstate', Navigate.popstate = function() { var a; a = $.el('a', { href: window.location, id: 'popState' }); return Navigate.navigate.call(a); - }; + }); }, refresh: function(context) { var boardID, feature, name, threadID, view, _i, _len, _ref, _ref1; diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index 4fe66277c..8dc95b6a8 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -290,12 +290,16 @@ Navigate = Unread.read() Unread.update() - popstate: -> <% if (type === 'crx') { %> Navigate.popstate = -> <% } %> # blink/webkit throw a popstate on page load. Not what we want. - a = $.el 'a', - href: window.location - id: 'popState' + popstate: -> <% if (type === 'crx') { %> + $.off window, 'popstate', Navigate.popstate + $.on window, 'popstate', Navigate.popstate = -> +<% } %> # blink/webkit throw a popstate on page load. Not what we want. - Navigate.navigate.call a + a = $.el 'a', + href: window.location + id: 'popState' + + Navigate.navigate.call a refresh: (context) -> return