chiark / gitweb /
journal: add mousewheel scrolling to browse.html
authorKay Sievers <kay@vrfy.org>
Wed, 10 Oct 2012 21:59:29 +0000 (23:59 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 10 Oct 2012 21:59:29 +0000 (23:59 +0200)
src/journal/browse.html

index 5a161a1..d5e0717 100644 (file)
                         }
                 }
 
+                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>