Advertisement
Sealington3

Info Bank Bookmarklet

Jan 19th, 2024
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. javascript:let code=localStorage.getItem("code");function view(){let e=prompt("Goto: ");"1"==e?alert(localStorage.getItem("i1")):"2"==e?alert(localStorage.getItem("i2")):"3"==e?alert(localStorage.getItem("i3")):"4"==e?alert(localStorage.getItem("i4")):"5"==e?alert(localStorage.getItem("i5")):alert("Invalid Slot.")}function make(){let e=prompt("Text to store:"),t=prompt("Slot (it will override any data there):"),o=prompt("Save?");"y"==(o=o.toLowerCase())?localStorage.setItem(`i${t}`,e):alert("Ok.")}function dlte(){let e=prompt("Slot:"),t=prompt("Sure?");"y"==(t=t.toLowerCase())?localStorage.removeItem(`i${e}`):alert("Ok.")}function guess(){if(prompt("Code:")==code){alert("V - View, M - Make, D - Delete");let e=prompt("Do:");"V"==e||"v"==e?view():"M"==e||"m"==e?make():"D"==e||"d"==e?dlte():alert("Invalid Command. Quitting.")}else alert("Incorrect Code.")}function reset(){let e=prompt("Reset the code?");if("y"==(e=e.toLowerCase())){alert("If you have not set a code yet, the code is 000");let t=prompt("Code:");t!=code?alert("Incorrect Code. Reset Failed."):(code=localStorage.setItem("code",t),alert("Correct Code. Reset Complete."))}else alert("Ok.")}null==code&&localStorage.setItem("code","000"),alert("Welcome to the Info Bank Bookmarklet. Made By: @Sealington, with help from chatGPT");let what=prompt("C for entering the code to access the menu, R to set the code (it is 000 by default)");"c"==(what=what.toLowerCase())?guess():"r"==what?reset():alert("Invalid Command. Quitting Info Bank.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement