mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
Fix result selection for top & bottom scrolling
This commit is contained in:
parent
7b48a66350
commit
c12e41a80f
@ -44,13 +44,13 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
71: {
|
71: {
|
||||||
key: 'g',
|
key: 'g',
|
||||||
fun: scrollPageTo(-document.body.scrollHeight),
|
fun: scrollPageTo(-document.body.scrollHeight, 'top'),
|
||||||
des: 'scroll to the top of the page',
|
des: 'scroll to the top of the page',
|
||||||
cat: 'Navigation'
|
cat: 'Navigation'
|
||||||
},
|
},
|
||||||
86: {
|
86: {
|
||||||
key: 'v',
|
key: 'v',
|
||||||
fun: scrollPageTo(document.body.scrollHeight),
|
fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
|
||||||
des: 'scroll to the bottom of the page',
|
des: 'scroll to the bottom of the page',
|
||||||
cat: 'Navigation'
|
cat: 'Navigation'
|
||||||
},
|
},
|
||||||
@ -241,10 +241,10 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function scrollPageTo(position) {
|
function scrollPageTo(position, nav) {
|
||||||
return function() {
|
return function() {
|
||||||
window.scrollTo(0, position);
|
window.scrollTo(0, position);
|
||||||
highlightResult('visible')();
|
highlightResult(nav)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user