NetNewsWire/iOS/Resources/page.html

35 lines
1.1 KiB
HTML
Raw Normal View History

<html>
<head>
<meta name="viewport" content="width=device-width">
<style>
:root {
color-scheme: light dark;
}
</style>
<script>
2019-09-19 07:53:25 +02:00
function mouseDidEnterLink(anchor) {
window.webkit.messageHandlers.mouseDidEnter.postMessage(anchor.href);
}
2019-09-19 07:53:25 +02:00
function mouseDidExitLink(anchor) {
window.webkit.messageHandlers.mouseDidExit.postMessage(anchor.href);
}
function render(data) {
2019-09-21 02:28:13 +02:00
document.getElementsByTagName("style")[0].innerHTML = data.style;
document.body.innerHTML = data.body;
2019-09-19 07:53:25 +02:00
window.scrollTo(0, 0);
document.getElementsByTagName("body")[0].querySelectorAll("style, link[rel=stylesheet]").forEach(element => element.remove());
document.getElementsByTagName("body")[0].querySelectorAll("[style]").forEach(element => element.removeAttribute("style"));
}
2019-09-19 07:53:25 +02:00
function error() {
document.body.innerHTML = "error";
}
</script>
</head>
<body>
</body>
</html>