From 5b1e5a38ee599970e976ebdcc2903a8553c25f3c Mon Sep 17 00:00:00 2001 From: SonicHedgehog Date: Fri, 12 Oct 2012 21:26:22 +0200 Subject: [PATCH] Fix interfering of prev/next keyboard navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only navigate via prev/next keyboard navigation if the alt key wasn’t pressed --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index d0af18b..e982d13 100644 --- a/script.js +++ b/script.js @@ -364,8 +364,8 @@ function track() { function access(evt){ prevNext=document.getElementsByTagName("link"); - if(evt.keyCode==37){location=prevNext[1].href} - if(evt.keyCode==39){location=prevNext[2].href} + if(evt.keyCode==37 && !evt.altKey){location=prevNext[1].href} + if(evt.keyCode==39 && !evt.altKey){location=prevNext[2].href} } document.onready = function() {