2021-09-14 04:03:27 +02:00
|
|
|
function scrollDetection() {
|
|
|
|
window.onscroll = function(event) {
|
|
|
|
window.webkit.messageHandlers.windowDidScroll.postMessage(window.scrollY);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-13 22:47:11 +02:00
|
|
|
function linkHover() {
|
2019-10-15 16:04:21 +02:00
|
|
|
window.onmouseover = function(event) {
|
2020-04-20 19:14:43 +02:00
|
|
|
var closestAnchor = event.target.closest('a')
|
|
|
|
if (closestAnchor) {
|
|
|
|
window.webkit.messageHandlers.mouseDidEnter.postMessage(closestAnchor.href);
|
2019-10-15 16:04:21 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
window.onmouseout = function(event) {
|
2020-04-20 19:14:43 +02:00
|
|
|
var closestAnchor = event.target.closest('a')
|
|
|
|
if (closestAnchor) {
|
|
|
|
window.webkit.messageHandlers.mouseDidExit.postMessage(closestAnchor.href);
|
2019-10-15 16:04:21 +02:00
|
|
|
}
|
|
|
|
}
|
2019-10-13 22:47:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function postRenderProcessing() {
|
2021-09-14 04:03:27 +02:00
|
|
|
scrollDetection();
|
|
|
|
linkHover();
|
2019-10-13 22:47:11 +02:00
|
|
|
}
|