helpful
This commit is contained in:
1 parent
f746eaa220
commit
83731d9a83
4 files changed
+141
-35
No files matched your search
+48
-18
@@ -4,34 +4,64 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Trail</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='style.css') }}">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{ url_for('static', path='style.css') }}"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
{% if queue_length > 0 %}
|
||||
<p>
|
||||
<a
|
||||
href="{{ current_link }}"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>{{ current_link }}</a
|
||||
<div class="trail-container">
|
||||
<div class="trail-count">{{ queue_length }}</div>
|
||||
<p>Items Left</p>
|
||||
|
||||
<p
|
||||
style="
|
||||
max-width: 80%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
>
|
||||
</p>
|
||||
<p>{{ queue_length }} left: click the screen to do magic</p>
|
||||
Next:
|
||||
<a
|
||||
href="{{ current_link }}"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>{{ current_link }}</a
|
||||
>
|
||||
</p>
|
||||
|
||||
<div class="trail-hint">Tap anywhere to open & next</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
if (window.opener) {
|
||||
console.log(/** @type {Window} */ (window.opener)); // hi hello hi
|
||||
}
|
||||
window.addEventListener("load", () => {
|
||||
window.addEventListener("click", () => {
|
||||
window.open(window.location.href, "_blank");
|
||||
history.replaceState(
|
||||
null,
|
||||
"lol. lmao, even.",
|
||||
new URL("/r", window.location.href).href
|
||||
);
|
||||
window.location.reload();
|
||||
document.body.addEventListener("click", async (e) => {
|
||||
if (e.target.tagName === "A") return;
|
||||
|
||||
// do trix
|
||||
await fetch("/r", { redirect: "manual" });
|
||||
|
||||
// now this is the new updated
|
||||
const newTab = window.open(window.location.href, "_blank");
|
||||
|
||||
// yo this is good no security error
|
||||
window.location.replace("{{ current_link }}");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% else %}
|
||||
<a href="/queuein">add some to queuein lil guy</a>
|
||||
<div class="card">
|
||||
<h2>All Done!</h2>
|
||||
<p>The queue is empty.</p>
|
||||
<div class="actions">
|
||||
<a href="/queuein" class="btn">Add More</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user