mirror of
https://github.com/searxng/searxng.git
synced 2025-12-31 08:00:02 +00:00
[mod] add swipe events to the image gallery (gesture control)
Adds [1] to the searxng.min.js and horizontal swipe events to the image gallery. [1] https://www.npmjs.com/package/swiped-events Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
d9115b8d48
commit
601ffcb8a3
@@ -113,6 +113,17 @@
|
||||
if (!window.location.hash) searxng.closeDetail();
|
||||
});
|
||||
|
||||
d.querySelectorAll('.swipe-horizontal').forEach(
|
||||
obj => {
|
||||
obj.addEventListener('swiped-left', function (e) {
|
||||
searxng.selectNext(false);
|
||||
});
|
||||
obj.addEventListener('swiped-right', function (e) {
|
||||
searxng.selectPrevious(false);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
w.addEventListener('scroll', function () {
|
||||
var e = d.getElementById('backToTop'),
|
||||
scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
|
||||
|
||||
Reference in New Issue
Block a user