1
0
mirror of https://github.com/MatMoul/quickdial-webext.git synced 2024-12-23 15:36:12 +00:00

Feature: Add page up and page down to change page

This commit is contained in:
MatMoul 2017-11-03 21:02:57 +01:00
parent 33c227a5a4
commit dbbf5ff718

View File

@ -30,6 +30,22 @@ window.onwheel = function(ev){
} }
} }
} }
window.addEventListener('keyup', function(e){
switch(e.key){
case 'PageDown':
if(dial.page < dial.maxpage){
dial.page += 1;
dial.populateGrid();
}
break;
case 'PageUp':
if(dial.page > 1){
dial.page -= 1;
dial.populateGrid();
}
break;
}
});