44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Queue Reader</title>
|
|
</head>
|
|
<body>
|
|
{% if current_link %}
|
|
<p>
|
|
<a href="/r" target="_blank" rel="noopener noreferrer" id="a"
|
|
>{{ current_link }}</a
|
|
>
|
|
</p>
|
|
<button id="b">skip/fw</button>
|
|
<script>
|
|
document.getElementById("b").addEventListener("click", async () => {
|
|
await fetch("/r", { method: "GET", redirect: "manual" });
|
|
setTimeout(() => {
|
|
window.location.reload();
|
|
});
|
|
});
|
|
/**@type {HTMLAnchorElement}*/
|
|
const a = document.getElementById("a");
|
|
a.addEventListener("click", function (e) {
|
|
// all ts so safari works ://
|
|
e.preventDefault();
|
|
window.open(
|
|
this.href,
|
|
this.target,
|
|
Array.from(this.relList).join(", ")
|
|
);
|
|
setTimeout(() => {
|
|
window.location.reload();
|
|
});
|
|
});
|
|
</script>
|
|
{% else %}
|
|
<p>no</p>
|
|
<button onclick="location.reload();">reload</button>
|
|
{% endif %}
|
|
</body>
|
|
</html>
|