summaryrefslogtreecommitdiff
path: root/JS/main.js
blob: 97b5449555f5278027bf67408bef6f75872d50dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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/";
        } 
        else{location='https://duckduckgo.com/?q=' + encodeURIComponent(document.getElementById('Search').value);}}//13 = enter
}
function FocusOnInput(){
    document.getElementById("Search").focus();
}