about summary refs log tree commit diff stats
path: root/html/playground
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-09-03 19:36:34 -0400
committerelioat <elioat@tilde.institute>2024-09-03 19:36:34 -0400
commit404e486571eaa24c4c538c1fbb2fe845af4bbc23 (patch)
treef3662dba4b4e34b499b442c2fd5cea254b7ae60d /html/playground
parent193bda7716a7373f65ed54680ae051b3192c1862 (diff)
downloadtour-404e486571eaa24c4c538c1fbb2fe845af4bbc23.tar.gz
*
Diffstat (limited to 'html/playground')
-rw-r--r--html/playground/index.html17
1 files changed, 16 insertions, 1 deletions
diff --git a/html/playground/index.html b/html/playground/index.html
index d987c22..ec575a5 100644
--- a/html/playground/index.html
+++ b/html/playground/index.html
@@ -92,8 +92,14 @@
 </head>
 <body>
 
+    <div class="playground">    
+        <!-- use this empty div to mount stuff -->
+        <div class="seesaw"></div>
+        <div class="slide"></div>
+    </div>
+
     <div class="button-container">
-        <button onclick="document.getElementById('codeInput').value='';window.location.hash='';">Clear</button>
+        <button onclick="clearEverything()">Clear</button>
         <button onclick="downloadCodeAndEditor()">Download</button>
         <button onclick="shareCode()">Share</button>
         <button onclick="evaluateCode()" class="run">Run Code</button>
@@ -156,6 +162,15 @@
             window.prompt("Copy the URL to share.\nBe warned! Very long URLs don't share wicked well, sometimes.", window.location.href);
         }
 
+        function clearEverything() {
+            if (!confirm('Are you sure you want to reset the playground?')) {
+                return;
+            } else {               
+                window.location.hash = '';
+                window.location.reload();
+            }
+        }
+
         function loadCodeFromHash() {
             const hash = window.location.hash.substring(1);
             if (hash) {
6c680cf1851b0a3bdac4dbf9f31bcc0287'>^
7f8a02d0c ^


33146a74c ^
7f8a02d0c ^
33146a74c ^



7f8a02d0c ^
33146a74c ^



7f8a02d0c ^
33146a74c ^











48ef6761d ^









1cd4799b0 ^








013e11fcc ^














1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131