diff options
Diffstat (limited to 'JS')
| -rwxr-xr-x | JS/binary.js | 15 | ||||
| -rwxr-xr-x | JS/command.js | 10 | ||||
| -rwxr-xr-x | JS/cookies.js | 36 | ||||
| -rwxr-xr-x | JS/main.js | 29 | ||||
| -rwxr-xr-x | JS/morsecode.js | 58 | ||||
| -rwxr-xr-x | JS/oldsidenav.js | 11 |
6 files changed, 0 insertions, 159 deletions
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<chars.length; a++) { -if (chars[a]!=" ") { -if (window.charCodes[chars[a]]) { -document.morsecode.codebox.value+=charCodes[chars[a]]+" "; -temp+=chars[a]+"="+charCodes[chars[a]]+"\n"; -} -else -temp+=chars[a]+"=(None)\n"; -} -else temp+="\n"; -} -document.morsecode.codebox.value+="\n\n\nEXPLANATION:\n\n"+temp -}
\ No newline at end of file diff --git a/JS/oldsidenav.js b/JS/oldsidenav.js deleted file mode 100755 index c9ebbe0..0000000 --- a/JS/oldsidenav.js +++ /dev/null @@ -1,11 +0,0 @@ -/*Attenion this sidebar Code will be removed when the rest of the pages on the main site are updated -It will still be available at https://old.jacobmcdonnell.com/version-1/ and at https://old.jacobmcdonnell.com/version-2/ */ -//sidebar code -function openNav() { - document.getElementById("mySidenav").style.width = "250px"; - document.getElementById("nav").style.marginLeft = "250px"; -} -function closeNav() { - document.getElementById("mySidenav").style.width = "0"; - document.getElementById("nav").style.marginLeft= "0"; -}
\ No newline at end of file |
