|
1 | | -<!DOCTYPE html> |
| 1 | +<!doctype html> |
2 | 2 | <html> |
3 | | -<meta charset=UTF-8> |
4 | | -<title>Grizzly ⋅ Post Launch Delay</title> |
5 | | -<head> |
6 | | -<style> |
7 | | -body { |
8 | | - background-color: #222; |
9 | | - color: #ccc; |
10 | | - font-family: monospace; |
11 | | - font-size: 1.2em; |
12 | | -} |
13 | | -button { |
14 | | - background-color: #444; |
15 | | - border: 2px solid; |
16 | | - border-color: #ccc; |
17 | | - color: inherit; |
18 | | - cursor: pointer; |
19 | | - font-family: inherit; |
20 | | - font-size: inherit; |
21 | | - padding: .1em .4em; |
22 | | -} |
23 | | -</style> |
24 | | -<script> |
25 | | -const args = window.location.search.replace('?', '') |
26 | | -const target = args ? `/grz_continue?${args}` : '/grz_continue' |
27 | | -let countInterval = null |
| 3 | + <meta charset="UTF-8" /> |
| 4 | + <title>Grizzly ⋅ Post Launch Delay</title> |
| 5 | + <head> |
| 6 | + <style> |
| 7 | + body { |
| 8 | + background-color: #222; |
| 9 | + color: #ccc; |
| 10 | + font-family: monospace; |
| 11 | + font-size: 1.2em; |
| 12 | + } |
| 13 | + button { |
| 14 | + background-color: #444; |
| 15 | + border: 2px solid; |
| 16 | + border-color: #ccc; |
| 17 | + color: inherit; |
| 18 | + cursor: pointer; |
| 19 | + font-family: inherit; |
| 20 | + font-size: inherit; |
| 21 | + padding: 0.1em 0.4em; |
| 22 | + } |
| 23 | + </style> |
| 24 | + <script> |
| 25 | + const args = window.location.search.replace("?", ""); |
| 26 | + const target = args ? `/grz_continue?${args}` : "/grz_continue"; |
| 27 | + let countInterval = null; |
28 | 28 |
|
29 | | -// parse args |
30 | | -let limit = 300 |
31 | | -if (args) { |
32 | | - for (let kv of args.split('&')) { |
33 | | - let [k, v] = kv.split('=') |
34 | | - if (k === 'post_launch_delay') { |
35 | | - limit = Math.max(Number.parseInt(v), 0) |
36 | | - break |
| 29 | + // parse args |
| 30 | + let limit = 300; |
| 31 | + if (args) { |
| 32 | + for (let kv of args.split("&")) { |
| 33 | + let [k, v] = kv.split("="); |
| 34 | + if (k === "post_launch_delay") { |
| 35 | + limit = Math.max(Number.parseInt(v), 0); |
| 36 | + break; |
| 37 | + } |
37 | 38 | } |
38 | | - } |
39 | | -} |
40 | | -let remaining = limit |
| 39 | + } |
| 40 | + let remaining = limit; |
41 | 41 |
|
42 | | -function countDown() { |
43 | | - remaining -= 1 |
44 | | - setTimeout(updateDisplay, 0) |
45 | | - if (remaining <= 0) |
46 | | - setTimeout(next, 0) |
47 | | -} |
| 42 | + function countDown() { |
| 43 | + remaining -= 1; |
| 44 | + setTimeout(updateDisplay, 0); |
| 45 | + if (remaining <= 0) setTimeout(next, 0); |
| 46 | + } |
48 | 47 |
|
49 | | -function next() { |
50 | | - if (countInterval) { |
51 | | - clearInterval(countInterval) |
52 | | - } |
53 | | - document.getElementById('msg').innerText = `> Redirecting...` |
54 | | - setTimeout(() => { |
55 | | - window.location = target |
56 | | - }, 0) |
57 | | -} |
| 48 | + function next() { |
| 49 | + if (countInterval) { |
| 50 | + clearInterval(countInterval); |
| 51 | + } |
| 52 | + document.getElementById("msg").innerText = `> Redirecting...`; |
| 53 | + setTimeout(() => { |
| 54 | + window.location = target; |
| 55 | + }, 0); |
| 56 | + } |
58 | 57 |
|
59 | | -function updateDisplay() { |
60 | | - remainingSeconds = Math.max(remaining, 0) |
61 | | - document.getElementById('msg').innerText = ( |
62 | | - `> Continuing automatically in: ${remainingSeconds}s` |
63 | | - ) |
64 | | -} |
| 58 | + function updateDisplay() { |
| 59 | + remainingSeconds = Math.max(remaining, 0); |
| 60 | + document.getElementById("msg").innerText = |
| 61 | + `> Continuing automatically in: ${remainingSeconds}s`; |
| 62 | + } |
65 | 63 |
|
66 | | -window.onload = () => { |
67 | | - setTimeout(updateDisplay, 0) |
68 | | - if (remaining) { |
69 | | - countInterval = setInterval(countDown, 1000) |
70 | | - } |
71 | | - else { |
72 | | - document.getElementById('btn').style.display = 'none' |
73 | | - document.getElementById('prompt').style.display = 'none' |
74 | | - setTimeout(countDown, 0) |
75 | | - } |
76 | | -} |
77 | | -</script> |
78 | | -</head> |
79 | | -<body> |
80 | | -<h4>Grizzly ⋅ Post Launch Delay</h4> |
81 | | -<div>> Browser launched.</div> |
82 | | -<div id='prompt'>> Connect debugger, etc...</div> |
83 | | -<div id='msg'></div> |
84 | | -<div> </div> |
85 | | -<button id='btn' onclick='next()'>Continue</button> |
86 | | -</body> |
| 64 | + window.onload = () => { |
| 65 | + setTimeout(updateDisplay, 0); |
| 66 | + if (remaining) { |
| 67 | + countInterval = setInterval(countDown, 1000); |
| 68 | + } else { |
| 69 | + document.getElementById("btn").style.display = "none"; |
| 70 | + document.getElementById("prompt").style.display = "none"; |
| 71 | + setTimeout(countDown, 0); |
| 72 | + } |
| 73 | + }; |
| 74 | + </script> |
| 75 | + </head> |
| 76 | + <body> |
| 77 | + <h4>Grizzly ⋅ Post Launch Delay</h4> |
| 78 | + <div>> Browser launched.</div> |
| 79 | + <div id="prompt">> Connect debugger, etc...</div> |
| 80 | + <div id="msg"></div> |
| 81 | + <div> </div> |
| 82 | + <button id="btn" onclick="next()">Continue</button> |
| 83 | + </body> |
87 | 84 | </html> |
0 commit comments