startpage

Simple text centric startpage
Log | Files | Refs | README

commit 34db705f7a1d4fec9cccffb807ea6fc9ff357c8c
parent 9cc606ce78eba120fc55e721d0b1b087e1339e98
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Tue, 19 Apr 2022 20:32:17 +0100

Merge javascript with index

I prefer single files when possible

Diffstat:
Mindex.html | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Dsrc/js/commands.js | 72------------------------------------------------------------------------
Dsrc/js/terminal.js | 2--
3 files changed, 76 insertions(+), 76 deletions(-)

diff --git a/index.html b/index.html @@ -31,8 +31,82 @@ </div> </div> </div> - <script src="./src/js/terminal.js"></script> - <script src="./src/js/commands.js"></script> + <script> + // functions + var current_block;function new_block(){(current_block=document.createElement("div")).classList.add("log"),document.getElementById("wrapper").appendChild(current_block)}function block_log(e,n=!1){current_block.innerHTML=`<p class=${n&&"shell"}>`+e+"</p>",new_block()}function handleKeyUp(){13===event.keyCode&&submit_command(),38===event.keyCode&&last_command()}function submit_command(){var e=document.getElementById("input_source").value;document.getElementById("input_source").value="",new_block(),"function"==typeof window[e.split(" ")[0]]?(block_log(config.shellPrompt+e,shell=!0),window[e.split(" ")[0]](e)):""!=e&&block_log("command not found : "+e)}function last_command(){const e=document.getElementsByClassName("shell");document.getElementById("input_source").value=e[e.length-1].innerText.substr(2)}config={shellPrompt:"$ "},document.getElementById("input_title").innerText=config.shellPrompt,document.getElementById("input_source").addEventListener("keyup",handleKeyUp); + // searches + function a(t){if("a"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.amazon.co.uk/s?k="+str.substring(1))}else window.open("https://www.amazon.co.uk/")} + function alp(t){if("alp"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://pkgs.alpinelinux.org/packages?branch=edge&arch=x86_64&name="+str.substring(1))}else window.open("https://pkgs.alpinelinux.org/packages?name=&branch=edge&arch=x86_64")} + function ap(t){if("ap"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.archlinux.org/packages/?sort=&q="+str.substring(1))}else window.open("https://www.archlinux.org/packages/")} + function archive(t){if("archive"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://web.archive.org/web/*/"+str.substring(1))}else window.open("https://web.archive.org/")} + function aur(t){if("aur"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://aur.archlinux.org/packages/?O=0&K="+str.substring(1))}else window.open("https://aur.archlinux.org/packages/")} + function aw(t){if("aw"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://wiki.archlinux.org/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://wiki.archlinux.org/")} + function bok(t){if("bok"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://b-ok.xyz/s/"+str.substring(3))}else window.open("https://b-ok.xyz/")} + function cb(t){if("cb"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://comicvine.gamespot.com/search/?q="+str.substring(1))}else window.open("https://comicvine.gamespot.com/")} + function choco(t){if("choco"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://chocolatey.org/packages?q="+str.substring(1))}else window.open("https://chocolatey.org/packages")} + function cron(t){if("cron"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://crontab.guru/#"+str.substring(3))}else window.open("https://crontab.guru/")} + function d(t){if("d"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://start.duckduckgo.com/?q="+str.substring(1))}else window.open("https://start.duckduckgo.com/")} + function deb(t){if("deb"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://packages.debian.org/"+str.substring(1))}else window.open("https://packages.debian.org/")} + function dock(t){if("dock"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://hub.docker.com/search/?pullCount=1&q="+str.substring(1))}else window.open("https://hub.docker.com/")} + function down(t){if("down"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://downforeveryoneorjustme.com/"+str.substring(1))}else window.open("https://downforeveryoneorjustme.com/")} + function e(t){if("e"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.ebay.co.uk/sch/i.html?_nkw="+str.substring(1))}else window.open("https://www.ebay.co.uk/")} + function f(t){if("f"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://search.f-droid.org/?lang=en&q="+str.substring(3))}else window.open("https://f-droid.org/")} + function g(t){if("g"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/search?q="+str.substring(1))}else window.open("https://www.google.co.uk")} + function ge(t){if("ge"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://www.ge-tracker.com/names/"+str.substring(3))}else window.open("https://www.ge-tracker.com/")} + function gf(t){if("gf"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://gamefaqs.gamespot.com/search?game="+str.substring(1))}else window.open("https://gamefaqs.gamespot.com/")} + function gist(t){if("gist"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://gist.github.com/search?utf8=%E2%9C%93&q="+str.substring(1))}else window.open("https://gist.github.com/")} + function git(t){if("git"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://github.com/search?q="+str.substring(1))}else window.open("https://github.com/")} + function gl(t){if("gl"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/search?btnI=1&q="+str.substring(1))}else window.open("https://www.google.co.uk")} + function gm(t){if("gm"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/maps/search/"+str.substring(1))}else window.open("https://www.google.co.uk/maps/")} + function gog(t){if("gog"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://www.gog.com/games?query="+str.substring(3))}else window.open("https://www.gog.com/")} + function gr(t){if("gr"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.goodreads.com/search?utf8=%E2%9C%93&query="+str.substring(1))}else window.open("https://www.goodreads.com/")} + function i(t){if("i"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/search?tbm=isch&q="+str.substring(1))}else window.open("https://images.google.co.uk/")} + function im(t){if("im"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.imdb.com/find?ref_=nv_sr_fn&s=all&q="+str.substring(1))}else window.open("https://imdb.com/")} + function ip(t){if("ip"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.ip2location.com/demo/"+str.substring(1))}else window.open("https://www.ip2location.com/")} + function jack(t){if("jack"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://jack.minskio.co.uk/UI/Dashboard#search="+str.substring(1))}else window.open("https://jack.minskio.co.uk")} + function last(t){if("last"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.last.fm/search?q="+str.substring(1))}else window.open("https://www.last.fm/")} + function lut(t){if("lut"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://lutris.net/games?q="+str.substring(1))}else window.open("https://lutris.net/")} + function m(t){if("m"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://wego.here.com/search/"+str.substring(1))}else window.open("https://wego.here.com/")} + function mac(t){if("mac"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://api.macvendors.com/"+str.substring(1))}else window.open("https://macvendors.com/")} + function mb(t){if("mb"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://musicbrainz.org/search?type=artist&limit=100&method=indexed&query="+str.substring(1))}else window.open("https://musicbrainz.org/")} + function mx(t){if("mx"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://mxtoolbox.com/SuperTool.aspx?action="+str.substring(1))}else window.open("https://mxtoolbox.com/SuperTool.aspx")} + function no(t){if("no"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://enno.dict.cc/?s="+str.substring(1))}else window.open("https://enno.dict.cc/")} + function nyaa(t){if("nyaa"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://nyaa.si/?s=seeders&o=desc&q="+str.substring(1))}else window.open("https://nyaa.si/")} + function osm(t){if("osm"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.openstreetmap.org/search?query="+str.substring(1))}else window.open("https://www.openstreetmap.org/")} + function osrs(t){if("osrs"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://oldschool.runescape.wiki/?title=Special%3ASearch&search="+str.substring(1))}else window.open("https://oldschool.runescape.wiki/")} + function pc(t){if("pc"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://pcgamingwiki.com/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://pcgamingwiki.com/w/index.php")} + function proton(t){if("proton"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://protondb.com/search?q="+str.substring(1))}else window.open("https://protondb.com/explore")} + function rfc(t){if("rfc"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://datatracker.ietf.org/doc/search?rfcs=on&name="+str.substring(3))}else window.open("https://datatracker.ietf.org/")} + function rshs(t){if("rshs"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal?user1="+str.substring(1))}else window.open("https://secure.runescape.com/m=hiscore_oldschool/")} + function rt(t){if("rt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.rottentomatoes.com/search/?search="+str.substring(1))}else window.open("https://www.rottentomatoes.com/")} + function s(t){if("s"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://store.steampowered.com/search/?term="+str.substring(1))}else window.open("https://store.steampowered.com/")} + function spot(t){if("spot"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://open.spotify.com/search/"+str.substring(3))}else window.open("https://open.spotify.com/")} + function srx(t){if("srx"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://anon.sx/?q="+str.substring(1))}else window.open("https://anon.sx/")} + function ss(t){if("ss"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://steamspy.com/search.php?s="+str.substring(1))}else window.open("https://steamspy.com/")} + function st(t){if("st"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.startpage.com/do/metasearch.pl?query="+str.substring(1))}else window.open("https://www.startpage.com/")} + function t(t){if("t"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://tineye.com/parse?url="+str.substring(1))}else window.open("https://tineye.com/")} + function tm(t){if("tm"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.themoviedb.org/search?query="+str.substring(1))}else window.open("https://www.themoviedb.org/")} + function tmt(t){if("tmt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.themoviedb.org/search/tv?query="+str.substring(1))}else window.open("https://www.themoviedb.org/")} + function tr(t){if("tr"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://translate.google.com/?sl=auto&tl=en&text="+str.substring(1))}else window.open("https://translate.google.com/")} + function tv(t){if("tv"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.thetvdb.com/search?query="+str.substring(1))}else window.open("https://www.thetvdb.com/")} + function tvt(t){if("tvt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://tvtropes.org/pmwiki/search_result.php?q="+str.substring(1))}else window.open("https://tvtropes.org/")} + function ud(t){if("ud"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.urbandictionary.com/define.php?term="+str.substring(1))}else window.open("https://www.urbandictionary.com/")} + function ujs(t){if("ujs"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://greasyfork.org/en/scripts?q="+str.substring(1))}else window.open("https://greasyfork.org/en/scripts")} + function valid(t){if("valid"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://validator.w3.org/nu/?doc="+str.substring(1))}else window.open("https://validator.w3.org/nu/")} + function w(t){if("w"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://en.wikipedia.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://en.wikipedia.org/w/index.php")} + function w3w(t){if("w3w"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"."+s[o];window.open("https://what3words.com/"+str.substring(1))}else window.open("https://what3words.com/")} + function wa(t){if("wa"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.wolframalpha.com/input/?i="+str.substring(1))}else window.open("https://www.wolframalpha.com/")} + function whois(t){if("whois"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://whois.gandi.net/en/results?search="+str.substring(1))}else window.open("https://whois.gandi.net/")} + function wikt(t){if("wikt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://en.wiktionary.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://en.wiktionary.org/w/index.php")} + function wiktno(t){if("wiktno"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://no.wiktionary.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://no.wiktionary.org/w/index.php")} + function wine(t){if("wine"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.winehq.org/search?q="+str.substring(1))}else window.open("https://www.winehq.org/")} + function wno(t){if("wno"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://no.wikipedia.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://no.wikipedia.org/w/index.php")} + function y(t){if("y"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.youtube.com/results?search_query="+str.substring(1))}else window.open("https://www.youtube.com/")} + + function clear(t){document.getElementById("wrapper").innerHTML=""} + function echo(t){block_log(t.split(" ").slice(1).join(" "))} + function file(t){"file"!=t?window.open("file:///"+t.split(" ").slice(1)[0]):window.open("file:///")} + </script> </body> </html> diff --git a/src/js/commands.js b/src/js/commands.js @@ -1,71 +0,0 @@ -function a(t){if("a"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.amazon.co.uk/s?k="+str.substring(1))}else window.open("https://www.amazon.co.uk/")} -function alp(t){if("alp"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://pkgs.alpinelinux.org/packages?branch=edge&arch=x86_64&name="+str.substring(1))}else window.open("https://pkgs.alpinelinux.org/packages?name=&branch=edge&arch=x86_64")} -function ap(t){if("ap"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.archlinux.org/packages/?sort=&q="+str.substring(1))}else window.open("https://www.archlinux.org/packages/")} -function archive(t){if("archive"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://web.archive.org/web/*/"+str.substring(1))}else window.open("https://web.archive.org/")} -function aur(t){if("aur"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://aur.archlinux.org/packages/?O=0&K="+str.substring(1))}else window.open("https://aur.archlinux.org/packages/")} -function aw(t){if("aw"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://wiki.archlinux.org/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://wiki.archlinux.org/")} -function bok(t){if("bok"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://b-ok.xyz/s/"+str.substring(3))}else window.open("https://b-ok.xyz/")} -function cb(t){if("cb"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://comicvine.gamespot.com/search/?q="+str.substring(1))}else window.open("https://comicvine.gamespot.com/")} -function choco(t){if("choco"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://chocolatey.org/packages?q="+str.substring(1))}else window.open("https://chocolatey.org/packages")} -function cron(t){if("cron"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://crontab.guru/#"+str.substring(3))}else window.open("https://crontab.guru/")} -function d(t){if("d"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://start.duckduckgo.com/?q="+str.substring(1))}else window.open("https://start.duckduckgo.com/")} -function deb(t){if("deb"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://packages.debian.org/"+str.substring(1))}else window.open("https://packages.debian.org/")} -function dock(t){if("dock"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://hub.docker.com/search/?pullCount=1&q="+str.substring(1))}else window.open("https://hub.docker.com/")} -function down(t){if("down"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://downforeveryoneorjustme.com/"+str.substring(1))}else window.open("https://downforeveryoneorjustme.com/")} -function e(t){if("e"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.ebay.co.uk/sch/i.html?_nkw="+str.substring(1))}else window.open("https://www.ebay.co.uk/")} -function f(t){if("f"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://search.f-droid.org/?lang=en&q="+str.substring(3))}else window.open("https://f-droid.org/")} -function g(t){if("g"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/search?q="+str.substring(1))}else window.open("https://www.google.co.uk")} -function ge(t){if("ge"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://www.ge-tracker.com/names/"+str.substring(3))}else window.open("https://www.ge-tracker.com/")} -function gf(t){if("gf"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://gamefaqs.gamespot.com/search?game="+str.substring(1))}else window.open("https://gamefaqs.gamespot.com/")} -function gist(t){if("gist"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://gist.github.com/search?utf8=%E2%9C%93&q="+str.substring(1))}else window.open("https://gist.github.com/")} -function git(t){if("git"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://github.com/search?q="+str.substring(1))}else window.open("https://github.com/")} -function gl(t){if("gl"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/search?btnI=1&q="+str.substring(1))}else window.open("https://www.google.co.uk")} -function gm(t){if("gm"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/maps/search/"+str.substring(1))}else window.open("https://www.google.co.uk/maps/")} -function gog(t){if("gog"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://www.gog.com/games?query="+str.substring(3))}else window.open("https://www.gog.com/")} -function gr(t){if("gr"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.goodreads.com/search?utf8=%E2%9C%93&query="+str.substring(1))}else window.open("https://www.goodreads.com/")} -function i(t){if("i"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.google.co.uk/search?tbm=isch&q="+str.substring(1))}else window.open("https://images.google.co.uk/")} -function im(t){if("im"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.imdb.com/find?ref_=nv_sr_fn&s=all&q="+str.substring(1))}else window.open("https://imdb.com/")} -function ip(t){if("ip"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.ip2location.com/demo/"+str.substring(1))}else window.open("https://www.ip2location.com/")} -function jack(t){if("jack"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://jack.minskio.co.uk/UI/Dashboard#search="+str.substring(1))}else window.open("https://jack.minskio.co.uk")} -function last(t){if("last"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.last.fm/search?q="+str.substring(1))}else window.open("https://www.last.fm/")} -function lut(t){if("lut"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://lutris.net/games?q="+str.substring(1))}else window.open("https://lutris.net/")} -function m(t){if("m"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://wego.here.com/search/"+str.substring(1))}else window.open("https://wego.here.com/")} -function mac(t){if("mac"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://api.macvendors.com/"+str.substring(1))}else window.open("https://macvendors.com/")} -function mb(t){if("mb"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://musicbrainz.org/search?type=artist&limit=100&method=indexed&query="+str.substring(1))}else window.open("https://musicbrainz.org/")} -function mx(t){if("mx"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://mxtoolbox.com/SuperTool.aspx?action="+str.substring(1))}else window.open("https://mxtoolbox.com/SuperTool.aspx")} -function no(t){if("no"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://enno.dict.cc/?s="+str.substring(1))}else window.open("https://enno.dict.cc/")} -function nyaa(t){if("nyaa"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://nyaa.si/?s=seeders&o=desc&q="+str.substring(1))}else window.open("https://nyaa.si/")} -function osm(t){if("osm"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.openstreetmap.org/search?query="+str.substring(1))}else window.open("https://www.openstreetmap.org/")} -function osrs(t){if("osrs"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://oldschool.runescape.wiki/?title=Special%3ASearch&search="+str.substring(1))}else window.open("https://oldschool.runescape.wiki/")} -function pc(t){if("pc"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://pcgamingwiki.com/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://pcgamingwiki.com/w/index.php")} -function proton(t){if("proton"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://protondb.com/search?q="+str.substring(1))}else window.open("https://protondb.com/explore")} -function rfc(t){if("rfc"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://datatracker.ietf.org/doc/search?rfcs=on&name="+str.substring(3))}else window.open("https://datatracker.ietf.org/")} -function rshs(t){if("rshs"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal?user1="+str.substring(1))}else window.open("https://secure.runescape.com/m=hiscore_oldschool/")} -function rt(t){if("rt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.rottentomatoes.com/search/?search="+str.substring(1))}else window.open("https://www.rottentomatoes.com/")} -function s(t){if("s"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://store.steampowered.com/search/?term="+str.substring(1))}else window.open("https://store.steampowered.com/")} -function spot(t){if("spot"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"%20"+s[o];window.open("https://open.spotify.com/search/"+str.substring(3))}else window.open("https://open.spotify.com/")} -function srx(t){if("srx"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://anon.sx/?q="+str.substring(1))}else window.open("https://anon.sx/")} -function ss(t){if("ss"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://steamspy.com/search.php?s="+str.substring(1))}else window.open("https://steamspy.com/")} -function st(t){if("st"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.startpage.com/do/metasearch.pl?query="+str.substring(1))}else window.open("https://www.startpage.com/")} -function t(t){if("t"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://tineye.com/parse?url="+str.substring(1))}else window.open("https://tineye.com/")} -function tm(t){if("tm"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.themoviedb.org/search?query="+str.substring(1))}else window.open("https://www.themoviedb.org/")} -function tmt(t){if("tmt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.themoviedb.org/search/tv?query="+str.substring(1))}else window.open("https://www.themoviedb.org/")} -function tr(t){if("tr"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://translate.google.com/?sl=auto&tl=en&text="+str.substring(1))}else window.open("https://translate.google.com/")} -function tv(t){if("tv"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.thetvdb.com/search?query="+str.substring(1))}else window.open("https://www.thetvdb.com/")} -function tvt(t){if("tvt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://tvtropes.org/pmwiki/search_result.php?q="+str.substring(1))}else window.open("https://tvtropes.org/")} -function ud(t){if("ud"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.urbandictionary.com/define.php?term="+str.substring(1))}else window.open("https://www.urbandictionary.com/")} -function ujs(t){if("ujs"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://greasyfork.org/en/scripts?q="+str.substring(1))}else window.open("https://greasyfork.org/en/scripts")} -function valid(t){if("valid"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://validator.w3.org/nu/?doc="+str.substring(1))}else window.open("https://validator.w3.org/nu/")} -function w(t){if("w"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://en.wikipedia.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://en.wikipedia.org/w/index.php")} -function w3w(t){if("w3w"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"."+s[o];window.open("https://what3words.com/"+str.substring(1))}else window.open("https://what3words.com/")} -function wa(t){if("wa"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.wolframalpha.com/input/?i="+str.substring(1))}else window.open("https://www.wolframalpha.com/")} -function whois(t){if("whois"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://whois.gandi.net/en/results?search="+str.substring(1))}else window.open("https://whois.gandi.net/")} -function wikt(t){if("wikt"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://en.wiktionary.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://en.wiktionary.org/w/index.php")} -function wiktno(t){if("wiktno"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://no.wiktionary.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://no.wiktionary.org/w/index.php")} -function wine(t){if("wine"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.winehq.org/search?q="+str.substring(1))}else window.open("https://www.winehq.org/")} -function wno(t){if("wno"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://no.wikipedia.org/w/index.php?title=Special:Search&search="+str.substring(1))}else window.open("https://no.wikipedia.org/w/index.php")} -function y(t){if("y"!=t){str="";for(var s=t.split(" ").slice(1),o=0;o<s.length;o++)str=str+"+"+s[o];window.open("https://www.youtube.com/results?search_query="+str.substring(1))}else window.open("https://www.youtube.com/")} - -function clear(t){document.getElementById("wrapper").innerHTML=""} -function echo(t){block_log(t.split(" ").slice(1).join(" "))} -function file(t){"file"!=t?window.open("file:///"+t.split(" ").slice(1)[0]):window.open("file:///")} -\ No newline at end of file diff --git a/src/js/terminal.js b/src/js/terminal.js @@ -1 +0,0 @@ -var current_block;function new_block(){(current_block=document.createElement("div")).classList.add("log"),document.getElementById("wrapper").appendChild(current_block)}function block_log(e,n=!1){current_block.innerHTML=`<p class=${n&&"shell"}>`+e+"</p>",new_block()}function handleKeyUp(){13===event.keyCode&&submit_command(),38===event.keyCode&&last_command()}function submit_command(){var e=document.getElementById("input_source").value;document.getElementById("input_source").value="",new_block(),"function"==typeof window[e.split(" ")[0]]?(block_log(config.shellPrompt+e,shell=!0),window[e.split(" ")[0]](e)):""!=e&&block_log("command not found : "+e)}function last_command(){const e=document.getElementsByClassName("shell");document.getElementById("input_source").value=e[e.length-1].innerText.substr(2)}config={shellPrompt:"$ "},document.getElementById("input_title").innerText=config.shellPrompt,document.getElementById("input_source").addEventListener("keyup",handleKeyUp); -\ No newline at end of file