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:
parent
dbbf5ff718
commit
f387c3662f
@ -12,24 +12,24 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
dial.init();
|
||||
});
|
||||
|
||||
window.onresize = function(){
|
||||
window.addEventListener('resize', function(){
|
||||
if(app && app.settings) dial.updateGridLayout();
|
||||
}
|
||||
window.onwheel = function(ev){
|
||||
});
|
||||
window.addEventListener('wheel', function(e){
|
||||
if(app && app.settings){
|
||||
if(ev.deltaY > 0){
|
||||
if(e.deltaY > 0){
|
||||
if(dial.page < dial.maxpage){
|
||||
dial.page += 1;
|
||||
dial.populateGrid();
|
||||
}
|
||||
} else if(ev.deltaY < 0){
|
||||
} else if(e.deltaY < 0){
|
||||
if(dial.page > 1){
|
||||
dial.page -= 1;
|
||||
dial.populateGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
window.addEventListener('keyup', function(e){
|
||||
switch(e.key){
|
||||
case 'PageDown':
|
||||
|
Loading…
Reference in New Issue
Block a user