var initprompt = prompt('Welcome to the JS bookmarklet command prompt, made by Curtis. Enter your command. Enter "help" for a few informational commands.\n\nUkraine being invaded by russia right now :troll: '); var loopvar = true function command(inp){ let input = inp.toLowerCase(); let words = input.split(' '); if(words[0] === "play"){ loopvar = false; if(words[1] === "mario64"){ let gamewindow = window.open("https://schoolist3r.netlify.app/sm64/", "idk"); }else if(words[1] === "evowars"){ let gamewindow = window.open("https://ioclasses.com/proxy/play/EvoWars-io#", "idk"); }else if(words[1] === "rpg"){ (function(){document.body.appendChild(document.createElement('script')).src='https://textbin.net/raw/igvzoa0z6h';})(); }else if(words[1] === "osu"){ let gamewindow = window.open("https://forkphorus.github.io/#220672247", "idk"); } }else if(input === "inspect"){ loopvar = false; (function () {var script=document.createElement('script');script.src='https://x-ray-goggles.mouse.org/webxray.js';script.className='webxray';script.setAttribute('data-lang','en-US');script.setAttribute('data-baseuri','https://x-ray-goggles.mouse.org');document.body.appendChild(script);}()) }else if(words[0] === "disguise"){ if(words[1] === "drive"){ function gcloak() {var link = document.querySelector("link[rel*='icon']") || document.createElement('link');link.type = 'image/x-icon';link.rel = 'shortcut icon';link.href = 'https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_5.ico';document.title = 'My Drive - Google Drive';console.log(document.title);document.getElementsByTagName('head')[0].appendChild(link) };gcloak();setInterval(gcloak, 1000); }else if(words[1] === "docs"){ function gcloak() {var link = document.querySelector("link[rel*='icon']") || document.createElement('link');link.type = 'image/x-icon';link.rel = 'shortcut icon';link.href = 'https://ssl.gstatic.com/docs/documents/images/kix-favicon7.ico';document.title = 'Google Docs';console.log(document.title);document.getElementsByTagName('head')[0].appendChild(link) };gcloak();setInterval(gcloak, 1000); }else if(words[1] === "custom" || words.length === 1){ let textprompt = prompt("Enter a name for the tab."); let imageprompt = prompt("Enter a URL leading directly to an image."); function gcloak() {var link = document.querySelector("link[rel*='icon']") || document.createElement('link');link.type = 'image/x-icon';link.rel = 'shortcut icon';link.href = imageprompt;document.title = textprompt;console.log(document.title);document.getElementsByTagName('head')[0].appendChild(link) };gcloak();setInterval(gcloak, 1000); } }else if(input === "help"){ let helpalert = alert("Here are some informational commands:\ncmds - Shows list of all commands.\ninfo - Gives some general information.\ngames - Shows all games that the command prompt can load."); }else if(input === "cmds" ||input === "commands"){ let commandsalert = alert('Here is a list of non-informational commands:\ninspect - Opens copy of inspect element.\ndisguise - Allows you to disguise your tab. If the second argument/word is "drive", it will disguise the tab as your google drive.\nplay - Allows you to play any game that the command prompt can load. use the "games" command to see them all.\nalert - Makes a message pop up on your screen.\nloopalert - Makes a message pop up on your screen that comes back when you cancel it.\ndelpage - Deletes all page content. Anything text after the command will be put on the blank page. Refresh to undelete.'); }else if(input === "games"){ let gamesalert = alert("Here is a list of games that the command prompt can load:\nevowars\nmario64\nrpg\nosu"); }else if(input === "info"||input === "information"){ let infoalert = alert("This command prompt is made by Curtis. Development started on 9/9/2021. Credit to schoolist3r for some of the commands and games."); }else if(words[0] === "alert"){ loopvar = false; let themessage = inp.substr(inp.indexOf(" ") + 1); alert(themessage); }else if(words[0] === "loopalert"){ loopvar = false; while(true === true){ let themessage = inp.substr(inp.indexOf(" ") + 1); alert(themessage); } }else if(input === "exit"){ loopvar = false; }else if(words[0] === "delpage"){ if(input === "delpage"){ document.open(); document.write(""); document.close(); return nil } loopvar = false; let themessage = inp.substr(inp.indexOf(" ") + 1); document.open(); document.write(themessage); document.close(); }else if(input === "piano"){ loopvar = false; (function(){document.body.appendChild(document.createElement('script')).src='https://textbin.net/raw/c3vk3uenis';})(); } } command(initprompt); while(loopvar === true){ let tempprompt = prompt('Enter a command. Enter "help" for a few informational commands.'); command(tempprompt); if(tempprompt === null){ loopvar = false; } }