summaryrefslogtreecommitdiff
path: root/JS
diff options
context:
space:
mode:
authormcd223 <jacob@simplelittledream.com>2019-03-13 14:11:23 -0400
committermcd223 <jacob@simplelittledream.com>2019-03-13 14:11:23 -0400
commit1baf2c3127d0904fc9baee7f87afca019e1ec5c8 (patch)
tree95967aa89e42156bb41db8f3eb58ec9dac46dc52 /JS
parent688b2b02be2ef1e235c6f40ac2911187f77b5bab (diff)
parent2726b3603f7e84e26efd1014dfd20eb938d36c8c (diff)
Merge branch 'master' of https://github.com/mcd223/mcd223.github.io
Diffstat (limited to 'JS')
-rw-r--r--JS/command.js10
-rw-r--r--JS/main.js8
2 files changed, 14 insertions, 4 deletions
diff --git a/JS/command.js b/JS/command.js
new file mode 100644
index 0000000..e46c268
--- /dev/null
+++ b/JS/command.js
@@ -0,0 +1,10 @@
+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/main.js b/JS/main.js
index 97b5449..ec46e4c 100644
--- a/JS/main.js
+++ b/JS/main.js
@@ -2,11 +2,11 @@ function searchDuck(event){
var x = document.getElementById('Search').value;
if (event.keyCode == 13 || event.which == 13) {
if (x == '/4chan'){
- document.getElementById("pLink").innerHTML = "4chan";
- document.getElementById("pLink").href = "https://4chan.org/";
- document.getElementById("pLinks").innerHTML = "4channel";
- document.getElementById("pLinks").href = "https://4channel.org/";
+ fourChan()
}
+ else if (x == '/help'){
+ help()
+ }
else{location='https://duckduckgo.com/?q=' + encodeURIComponent(document.getElementById('Search').value);}}//13 = enter
}
function FocusOnInput(){