From 359a503bd01624e7df78d8fab5dac6425fca1eda Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 16 May 2014 09:00:26 -0700 Subject: [PATCH] Fix zixaphir/appchan-x#668 --- builds/4chan-X.user.js | 5 +++-- builds/crx/script.js | 5 +++-- src/General/Index.coffee | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 1ecbb9208..3610d40d3 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -2801,12 +2801,13 @@ thread = g.threads[this.parentNode.dataset.fullID]; if (e.shiftKey) { PostHiding.toggle(thread.OP); + return e.preventDefault(); } else if (e.altKey) { Index.togglePin(thread); + return e.preventDefault(); } else { - Navigate.navigate.call(this); + return Navigate.navigate.call(this, e); } - return e.preventDefault(); }, onOver: function(e) { var el, nodes; diff --git a/builds/crx/script.js b/builds/crx/script.js index 11408765d..630f406ec 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -2860,12 +2860,13 @@ thread = g.threads[this.parentNode.dataset.fullID]; if (e.shiftKey) { PostHiding.toggle(thread.OP); + return e.preventDefault(); } else if (e.altKey) { Index.togglePin(thread); + return e.preventDefault(); } else { - Navigate.navigate.call(this); + return Navigate.navigate.call(this, e); } - return e.preventDefault(); }, onOver: function(e) { var el, nodes; diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 3eb316dad..5050ddb47 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -203,11 +203,12 @@ Index = thread = g.threads[@parentNode.dataset.fullID] if e.shiftKey PostHiding.toggle thread.OP + e.preventDefault() else if e.altKey Index.togglePin thread + e.preventDefault() else - Navigate.navigate.call @ - e.preventDefault() + Navigate.navigate.call @, e onOver: (e) -> # 4chan's less than stellar CSS forces us to include a .post and .postInfo