Skip to content

Commit

Permalink
#4279 ctrl+up/down for all ff
Browse files Browse the repository at this point in the history
Signed-off-by: Aayush Anand <aayushism12@gmail.com>
  • Loading branch information
whitepiegon committed Mar 26, 2014
1 parent 25c227a commit e831540
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions js/keyhandler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */

// gloabl vars that holds: 0- if ctrl key is not pressed 1- if ctrl key is pressed
// global var that holds: 0- if ctrl key is not pressed 1- if ctrl key is pressed
var ctrlKeyHistory = 0;

/**
Expand Down Expand Up @@ -95,23 +95,30 @@ function onKeyDownArrowsHandler(e)
nO.focus();

if (is_firefox) {
var ffversion = '24';
var is_firefox_v_24 = navigator.userAgent.toLowerCase().indexOf('firefox/'+ffversion) > -1;
if (is_firefox_v_24) {
var ffcheck = 0;
var ffversion;
for (ffversion = 3 ; ffversion < 24 ; ffversion++) {
var is_firefox_v_24 = navigator.userAgent.toLowerCase().indexOf('firefox/'+ffversion) > -1;
if (is_firefox_v_24) {
ffcheck = 1;
break;
}
}
if (ffcheck == 1) {
if (e.which == 38 || e.which == 37) {
nOvalue++;
nOvalue++;
}
else if (e.which == 40 || e.which == 39) {
nOvalue--;
nOvalue--;
}
nO.selectedIndex=nOvalue;
}
else {
if (e.which == 38 || e.which == 37) {
lvalue++;
lvalue++;
}
else if (e.which == 40 || e.which == 39) {
lvalue--;
lvalue--;
}
o.selectedIndex=lvalue;
}
Expand Down

0 comments on commit e831540

Please sign in to comment.