summaryrefslogtreecommitdiff
path: root/webcards/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'webcards/index.html')
-rw-r--r--webcards/index.html133
1 files changed, 0 insertions, 133 deletions
diff --git a/webcards/index.html b/webcards/index.html
deleted file mode 100644
index 2f20bc5..0000000
--- a/webcards/index.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
- <head>
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <meta charset="utf-8">
-
- <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="styles/icofont.css">
-
- <link rel="icon" sizes="32x32" href="images/wc-icon-32.png">
- <link rel="icon" sizes="48x48" href="images/wc-icon-48.png">
- <link rel="icon" sizes="96x96" href="images/wc-icon-96.png">
- <link rel="icon" sizes="144x144" href="images/wc-icon-144.png">
- <link rel="icon" sizes="288x288" href="images/wc-icon-288.png">
-
- <link rel="stylesheet" type="text/css" href="styles/home/base.css">
- <link rel="stylesheet" type="text/css" href="styles/home/desktop.css">
- <link rel="stylesheet" type="text/css" href="styles/home/mobile.css">
-
- <link rel="stylesheet" type="text/css" href="styles/input.css">
-
- <link id="theme" rel="stylesheet" type="text/css" href="styles/themes/colors-base.css">
-
- <script src="scripts/gui/input.js"></script>
-
- <script src="scripts/cookie.js"></script>
- <script src="scripts/theme.js"></script>
-
- <title>WebCards</title>
- </head>
-
- <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>
-
- <button id="conn" onclick="connect()">Connect</button>
-
- <div id="prev" class="prev">
-
- </div>
-
- <a style="border: none; padding: 0; display: contents; margin: 0;" href="http://vanilla-js.com/"><img src="images/vanilla.png"></a>
- </div>
-
- <script>
- var prev = Cookies.getCookie("prevAddr");
- var prevEl = document.getElementById("prev");
-
- function hasAddr(url) {
- let urls = prev.split(",");
-
- for(let i in urls)
- {
- if(urls[i] == url)
- return true;
- }
-
- return false;
- }
-
- function addAddr(url) {
- if(hasAddr(url))
- return;
-
- if(prev != "")
- prev = prev + "," + url;
- else
- prev = url;
-
- Cookies.setYearCookie("prevAddr", prev);
- }
-
- function delAddr(el, btn) {
- let url = el.innerText;
- let urls = prev.split(",");
- urls.splice(urls.indexOf(url), 1);
- Cookies.setCookie("prevAddr", urls.join());
- el.remove();
- btn.remove();
- prev = Cookies.getCookie("prevAddr");
- }
-
- let urls = prev.split(",");
- for(let i in urls) {
- if(urls[i] == "")
- continue;
-
- let a = document.createElement("a");
- a.innerText = urls[i];
- a.href = "client.html?s=" + urls[i] + "&g=-1";
-
- let b = document.createElement("button");
- b.innerText = "X";
- b.onclick = delAddr.bind(null, a, b);
-
- prevEl.appendChild(a);
- prevEl.append(b);
- }
-
- </script>
-
- <script>
- var proto = document.getElementById("protocol");
- var addr = document.getElementById("addr");
- var port = document.getElementById("port");
- var conn = document.getElementById("conn");
-
- //t.onchange = updateLink;
- //a.onchange = updateLink;
- //p.onchange = updateLink;
-
- function connect() {
- let concat = MakeInput.selValue(proto) + addr.value + ":" + port.value;
- addAddr(concat);
- //c.setAttribute("href", url);
- window.location = "client.html?s=" + concat + "&g=-1";
- }
- </script>
- </body>
-</html> \ No newline at end of file