From fcd16bc0fc2ffd457d2f085395f97af752f1093d Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sat, 16 Jan 2021 21:21:22 -0500 Subject: New Version of the website --- JS/binary.js | 15 --------------- JS/command.js | 10 ---------- JS/cookies.js | 36 ----------------------------------- JS/main.js | 29 ---------------------------- JS/morsecode.js | 58 -------------------------------------------------------- JS/oldsidenav.js | 11 ----------- 6 files changed, 159 deletions(-) delete mode 100755 JS/binary.js delete mode 100755 JS/command.js delete mode 100755 JS/cookies.js delete mode 100755 JS/main.js delete mode 100755 JS/morsecode.js delete mode 100755 JS/oldsidenav.js (limited to 'JS') diff --git a/JS/binary.js b/JS/binary.js deleted file mode 100755 index d0b8d21..0000000 --- a/JS/binary.js +++ /dev/null @@ -1,15 +0,0 @@ -//binary code convertor -function convertBinary() { - var output = document.getElementById("outputBinary"); - var input = document.getElementById("inputBinary").value; - output.value = ""; - for (i=0; i < input.length; i++) {var e=input[i].charCodeAt(0);var s = ""; - do{ - var a =e%2; - e=(e-a)/2; - s=a+s; - }while(e!=0); - while(s.length<8){s="0"+s;} - output.value+=s; - } -} \ No newline at end of file diff --git a/JS/command.js b/JS/command.js deleted file mode 100755 index e46c268..0000000 --- a/JS/command.js +++ /dev/null @@ -1,10 +0,0 @@ -function fourChan() { - document.getElementById("pLink").innerHTML = "4chan"; - document.getElementById("pLink").href = "https://4chan.org/"; - document.getElementById("pLinks").innerHTML = "4channel"; - document.getElementById("pLinks").href = "https://4channel.org/"; -} -function help(){ - alert('hahahaha. There is no help. You cannot escape.'); - help() -} \ No newline at end of file diff --git a/JS/cookies.js b/JS/cookies.js deleted file mode 100755 index f0a9bba..0000000 --- a/JS/cookies.js +++ /dev/null @@ -1,36 +0,0 @@ -function setCookie(cname,cvalue,exdays) { - var d = new Date(); - d.setTime(d.getTime() + (exdays*24*60*60*1000)); - var expires = "expires=" + d.toGMTString(); - document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; -} -function getCookie(cname) { - var name = cname + "="; - var decodedCookie = decodeURIComponent(document.cookie); - var ca = decodedCookie.split(';'); - for(var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) == ' ') { - c = c.substring(1); - } - if (c.indexOf(name) == 0) { - return c.substring(name.length, c.length); - } - } - return ""; -} -function checkCookie() { - var theme=getCookie("theme"); - if(theme == ""){ - setCookie("theme","PurpleAndDark",365); - window.location.reload(false); - }else if(theme == "GreenAndWhite"){ - document.getElementById("cssFile").href = "CSS/main.css"; - }else if(theme == "GreenAndDark"){ - document.getElementById("cssFile").href = "CSS/GreenAndDark.css"; - }else if(theme == "PurpleAndWhite"){ - document.getElementById("cssFile").href = "CSS/PurpleAndWhite.css"; - }else if(theme == "PurpleAndDark"){ - document.getElementById("cssFile").href = "CSS/PurpleAndDark.css"; - } -} diff --git a/JS/main.js b/JS/main.js deleted file mode 100755 index e541d5f..0000000 --- a/JS/main.js +++ /dev/null @@ -1,29 +0,0 @@ -function searchDuck(event){ - var x = document.getElementById('Search').value; - if (event.keyCode == 13 || event.which == 13) { - if (x == '/4chan'){ - fourChan() - } - else if (x == '/help'){ - help() - } - else{location='https://duckduckgo.com/?q=' + encodeURIComponent(document.getElementById('Search').value);}}//13 = enter -} -function FocusOnInput(){ - document.getElementById("Search").focus(); -} -function dropdown(theID) { - document.getElementById(theID).classList.toggle("show"); -} -window.onclick = function(event) { //when the user clicks anywhere else on the screen the menu disappears - if (!event.target.matches('.dropbtn')) { - var dropdowns = document.getElementsByClassName("dropdown-content"); - var i; - for (i = 0; i < dropdowns.length; i++) { - var openDropdown = dropdowns[i]; - if (openDropdown.classList.contains('show')) { - openDropdown.classList.remove('show'); - } - } - } -} diff --git a/JS/morsecode.js b/JS/morsecode.js deleted file mode 100755 index f95ac5d..0000000 --- a/JS/morsecode.js +++ /dev/null @@ -1,58 +0,0 @@ -//deals with morse code page -var charCodes=new Array(36); charCodes["a"]=". _"; -charCodes["b"]="_ . . ."; -charCodes["c"]="_ . _ ."; -charCodes["d"]="_ . ."; -charCodes["e"]="."; -charCodes["f"]=". . _ ."; -charCodes["g"]="_ _ ."; -charCodes["h"]=". . . ."; -charCodes["i"]=". ."; -charCodes["j"]=". _ _ _"; -charCodes["k"]="_ . _"; -charCodes["l"]=". _ . ."; -charCodes["m"]="_ _"; -charCodes["n"]="_ ."; -charCodes["o"]="_ _ _"; -charCodes["p"]=". _ _ ."; -charCodes["q"]="_ _ . _"; -charCodes["r"]=". _ ."; -charCodes["s"]=". . ."; -charCodes["t"]="_"; -charCodes["u"]=". . _"; -charCodes["v"]=". . . _"; -charCodes["w"]=". _ _"; -charCodes["x"]="_ . . _"; -charCodes["y"]="_ . _ _"; -charCodes["z"]="_ _ . ."; -charCodes["1"]=". _ _ _ _"; -charCodes["2"]=". . _ _ _"; -charCodes["3"]=". . . _ _"; -charCodes["4"]=". . . . _"; -charCodes["5"]=". . . . ."; -charCodes["6"]="_ . . . ."; -charCodes["7"]="_ _ . . ."; -charCodes["8"]="_ _ _ . ."; -charCodes["9"]="_ _ _ _ ."; -charCodes["0"]="_ _ _ _ _"; -var temp='' - -function encode() { -document.morsecode.chars.value=document.morsecode.chars.value.toLowerCase(); -document.morsecode.codebox.value=""; -temp='' -var chars=document.morsecode.chars.value.split(""); - -for (a=0; a