From e6534a5d219e058864904ed5d6b582adab748a8d Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sat, 8 Mar 2014 16:44:54 -0700 Subject: [PATCH] Handle current page links a bit more elegantly --- builds/4chan-X.user.js | 5 +++++ builds/crx/script.js | 5 +++++ src/General/Navigate.coffee | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 13717a6f8..b536b7d04 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -12763,6 +12763,11 @@ return; } if (this.pathname === Navigate.path) { + if (g.VIEW === 'thread') { + ThreadUpdater.update(); + } else { + Index.update(); + } e.preventDefault(); return; } diff --git a/builds/crx/script.js b/builds/crx/script.js index 0c7aa8f5f..467c6017e 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12777,6 +12777,11 @@ return; } if (this.pathname === Navigate.path) { + if (g.VIEW === 'thread') { + ThreadUpdater.update(); + } else { + Index.update(); + } e.preventDefault(); return; } diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index 790fcf6db..f16c973d0 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -160,7 +160,13 @@ Navigate = navigate: (e) -> return if @hostname isnt 'boards.4chan.org' or window.location.hostname is 'rs.4chan.org' return if e and (e.shiftKey or e.ctrlKey or (e.type is 'click' and e.button isnt 0)) # Not simply a left click + + if @pathname is Navigate.path + if g.VIEW is 'thread' + ThreadUpdater.update() + else + Index.update() e.preventDefault() return