website/grt.html

49 lines
1.5 KiB
HTML

<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<video autoplay muted loop class="bgvideo">
<source src="Untitled.mp4" type="video/mp4">
</video>
<div class="middlething">
<div class="navbar"> <a href="index.html">Main Page </a><a id="active" href="grt.html">GR Translator</a></div>
<p class="paragraph" style="padding-top: 20px;">plural decode</p>
<input placeholder="base16 " id="base16" name="name" />
<p class="paragraph" id="base16o"></p>
<p class="paragraph">abd3 decode</p>
<input placeholder="base32" id="base32" name="name" />
<p class="paragraph" id="base32o"></p>
</div>
</body>
<script>
const base32Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
//code stolen from everywhere
function hex2a(hexx) {
var hex = hexx.toString();//force conversion
var str = '';
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
return str;
}
const base16i = document.getElementById("base16");
const base16o = document.getElementById("base16o");
const base32i = document.getElementById("base32");
const base32o = document.getElementById("base32o");
base16i.addEventListener("input", updateValue);
base32i.addEventListener("input", b32d);
function updateValue(e) {
base16o.textContent = hex2a(e.target.value);
}
function b32d(e){
base32o.textContent = "its not done yet lol";
}
</script>