-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdummy.html
More file actions
93 lines (86 loc) · 2.31 KB
/
dummy.html
File metadata and controls
93 lines (86 loc) · 2.31 KB
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
<!--
Example client that can run in your browser.
Open this page, then open your browser console (usually F12 or Right Click -> Inspect Element)
Use setVariable("☁ variable", "1") to set variables.
Use getVariable("☁ variable") to read variables.
-->
<head>
<title>Dummy Client - Scratch Client</title>
<link rel="shortcut icon" href="favicon.ico">
<script>var vartoget = "☁ variable"</script>
<style>
body {
font-family: "Helvetica Neue", Helvetica, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-color: #3498db;
flex-direction: column;
}
.label {
font-size: 9.45pt;
font-weight: bold;
color: #575E75;
white-space: pre;
}
.var {
display: inline-block;
background-color: #FF8C1A;
border-radius: 30px;
font-size: 16.2pt;
color: white;
font-weight: 500;
padding-top: 14px;
padding-bottom: 14px;
padding-left: 16px;
padding-right: 16px;
text-decoration: none;
white-space: pre;
margin: 5px;
}
.text {
font-size: 81pt;
color: black;
font-weight: 750;
line-height: 0.1;
color: white;
-webkit-text-stroke: 2px white;
}
.varC {
font-size: 21pt;
color: black;
font-weight: 750;
line-height: 0.1;
color: white;
-webkit-text-stroke: 1px white;
}
</style>
</head>
<body>
<p class="varC" id="varC">☁ variable</p>
<p class="text" id="text">1.000</p>
<div>
<button class="var" onclick="vartoget = prompt('Get Variable:');">get variable</button>
<button class="var" onclick="setVariable(vartoget, prompt('Number:'));">set variable</button>
<button class="var">set server</button>
<button class="var" onclick="usrName = prompt('New Username:');">set username</button>
</div>
<script>
var usrName = "user"
var variables = {};
function setVariable(name, value) {
console.log(`Setting variable: ${name} = ${value}`);
variables[name] = value;
}
function getVariable(name) {
return variables[name];
}
vartoget = "☁ variable"
setInterval(() => {
document.getElementById('text').textContent = getVariable(vartoget);
document.getElementById('varC').textContent = vartoget;
}, 100);
</script>
</body>