summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-10-10 23:59:29 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-10 23:59:29 +0200
commit19f8efacc5ef96bd4f3553ff3dd3e94c4a1bd59c (patch)
tree6318c834dfd6c9c15747b4deddadb981ffa3f4b8
parent6d5f2f58033493a71402755944f46f09d990bad4 (diff)
journal: add mousewheel scrolling to browse.html
-rw-r--r--src/journal/browse.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/journal/browse.html b/src/journal/browse.html
index 5a161a13fb..d5e0717c53 100644
--- a/src/journal/browse.html
+++ b/src/journal/browse.html
@@ -419,10 +419,21 @@
}
}
+ function onMouseWheel(event) {
+ if (event.detail < 0 || event.wheelDelta > 0)
+ entriesLoadPrevious();
+ else
+ entriesLoadNext();
+ }
+
machineLoad();
entriesLoad("");
showNEntries(getNEntries());
document.onkeyup = onKeyUp;
+
+ logs = document.getElementById("tablelogs");
+ logs.addEventListener("mousewheel", onMouseWheel, false);
+ logs.addEventListener("DOMMouseScroll", onMouseWheel, false);
</script>
</body>
</html>