diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index d1ccb5d12..c85bbf0c2 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -11920,7 +11920,7 @@ return $.on(replyLink, 'click', Navigate.navigate); }, post: function() { - var hashlink, postlink, _i, _len, _ref, _results; + var hashlink, postlink, _i, _len, _ref; if (g.VIEW === 'thread' && this.thread.ID === g.THREADID) { return; } @@ -11930,12 +11930,10 @@ return; } _ref = $$('.hashlink', this.nodes.comment); - _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { hashlink = _ref[_i]; - _results.push($.on(hashlink, 'click', Navigate.navigate)); + $.on(hashlink, 'click', Navigate.navigate); } - return _results; }, clean: function() { var posts, threads; diff --git a/builds/crx/script.js b/builds/crx/script.js index f014ef368..73f2c3e30 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -11909,7 +11909,7 @@ return $.on(replyLink, 'click', Navigate.navigate); }, post: function() { - var hashlink, postlink, _i, _len, _ref, _results; + var hashlink, postlink, _i, _len, _ref; if (g.VIEW === 'thread' && this.thread.ID === g.THREADID) { return; } @@ -11919,12 +11919,10 @@ return; } _ref = $$('.hashlink', this.nodes.comment); - _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { hashlink = _ref[_i]; - _results.push($.on(hashlink, 'click', Navigate.navigate)); + $.on(hashlink, 'click', Navigate.navigate); } - return _results; }, clean: function() { var posts, threads; diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index 8e30ae722..16c8bda60 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -2,7 +2,7 @@ Navigate = path: window.location.pathname init: -> return if g.VIEW is 'catalog' or g.BOARD.ID is 'f' - + # blink/webkit throw a popstate on page load. Not what we want. $.ready -> $.on window, 'popstate', Navigate.popstate @@ -31,6 +31,8 @@ Navigate = for hashlink in $$ '.hashlink', @nodes.comment $.on hashlink, 'click', Navigate.navigate + return + clean: -> {posts, threads} = g @@ -133,7 +135,7 @@ Navigate = error: err ] return false - + return unless board Navigate.updateTitle board @@ -147,7 +149,7 @@ Navigate = ['ws', 'Yotsuba B New'] else ['nws', 'Yotsuba New'] - + $.globalEval "var style_group = '#{style[1]}'" mainStyleSheet = $ 'link[title=switch]', d.head