diff --git a/index.html b/index.html index c45d585..1fc530c 100644 --- a/index.html +++ b/index.html @@ -68,13 +68,19 @@ function switchTab(name) { // Switches the tab - // only "encode" and "decode" values are supported + // only "encode","decode" and "about" values are supported if (name === "encode") { document.getElementById("encode").style.display = "block" document.getElementById("decode").style.display = "none" + document.getElementById("about").style.display = "none" } else if (name === "decode") { document.getElementById("encode").style.display = "none" document.getElementById("decode").style.display = "block" + document.getElementById("about").style.display = "none" + } else if (name === "about") { + document.getElementById("encode").style.display = "none" + document.getElementById("decode").style.display = "none" + document.getElementById("about").style.display = "block" } } @@ -84,7 +90,7 @@ const urlParams = new URLSearchParams(window.location.search); if ( urlParams.has("tab") && - ["encode", "decode"].includes(urlParams.get("tab")) + ["encode", "decode", "about"].includes(urlParams.get("tab")) ) { // Check if tab parameter is set up and is correct // If not, an default value will be used @@ -92,6 +98,7 @@ } switchTab(tabOpen) + document.getElementsByClassName("tabBar")[0].style.display = "flex" // Show the result of the action performed before reloading if (urlParams.get("tab") === "encode" && urlParams.has("infohashv1")) { document.getElementById("encodeResult").innerText = infohashToBase64(urlParams.get("infohashv1")) @@ -122,6 +129,7 @@ margin-right: 0.5rem; } .tab { + display: none; /* Default value to keep tabs hidden when JS is not available */ border: 1px solid white; padding: 0.5em; border-radius: 0em 1em 1em 1em; @@ -135,7 +143,7 @@ border-radius: 1em; } .tabBar { - display: flex; + display: none; /* Default value to keep tabs hidden when JS is not available */ border-collapse: collapse; } .button { @@ -150,6 +158,7 @@ .button:active { background-color: rgba(255,255,255, 0.2); } + a { color: cyan; text-decoration: none;}
@@ -162,6 +171,7 @@