summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2021-02-11 12:30:32 -0500
committerKyle Gunger <kgunger12@gmail.com>2021-02-11 12:30:32 -0500
commit8f0c5a6077fd245cf74337e4fdb98445418f608c (patch)
tree5d0289c5d3bb1ace7750cd9d26a586a0b8ee4ddf /index.html
parent9afa0420b0d34d8484a71ae278e4dbd1630a035a (diff)
Index and min-content fix
Diffstat (limited to 'index.html')
-rw-r--r--index.html42
1 files changed, 23 insertions, 19 deletions
diff --git a/index.html b/index.html
index 2f20bc5..d7d5255 100644
--- a/index.html
+++ b/index.html
@@ -33,17 +33,7 @@
<body>
<div class="content">
<p style="font-size: 30px; font-weight: normal;">Web<span style="color: #0084ff; font-weight: bold;">Cards</span></p>
- <div>
- <div class="input-container" tabindex="0" type="select">
- <div id="protocol" tabindex="0" selected="1" class="input-select">
- <div value="ws://" onmousedown="MakeInput.selOption(this)">ws</div>
- <div value="wss://" onmousedown="MakeInput.selOption(this)" selected="true">wss</div>
- </div>
- </div>
-
- <input id="addr" type="text" value="localhost">
-
- <input id="port" type="number" value="4040">
+ <div id="options">
</div>
<button id="conn" onclick="connect()">Connect</button>
@@ -113,17 +103,31 @@
</script>
<script>
- var proto = document.getElementById("protocol");
- var addr = document.getElementById("addr");
- var port = document.getElementById("port");
- var conn = document.getElementById("conn");
+ const Options = [
+ {
+ type: "select",
+ args: [["WSS", "WS"], ["wss://", "ws://"]],
+ title: "Protocol"
+ },
+ {
+ type: "text",
+ args: ["localhost"],
+ title: "Server URL"
+ },
+ {
+ type: "number",
+ args: [4040],
+ title: "Server Port"
+ }
+ ];
- //t.onchange = updateLink;
- //a.onchange = updateLink;
- //p.onchange = updateLink;
+ var optionsEL = document.getElementById("options");
+ var options = new Settings(Options);
+ options.putSettings(optionsEL);
function connect() {
- let concat = MakeInput.selValue(proto) + addr.value + ":" + port.value;
+ let serverParts = options.getSettings();
+ let concat = serverParts[0] + serverParts[1] + ":" + serverParts[2];
addAddr(concat);
//c.setAttribute("href", url);
window.location = "client.html?s=" + concat + "&g=-1";