Golden-ifpass

ifpass-1.7.0

Sep 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* ifpass 1.7.0 by Golden. Paste into a bookmark to use. Have fun! I am not liable for any consequences of you misusing this code. You are allowed to modify this code as long as I am credited as the original creator. */
  2. var version = "ifpass 1.7.0 by Golden";
  3. var scriptString = `
  4. var homePage = "https://web.archive.org";
  5. var version = "` + version + `";
  6. var news = "NEW:\\n - Fixed things so they work now\\n - Also rewrite yay";
  7. var features = "Features:\\n - Doesn't save to search history.\\n - Works in Firefox and Chrome.\\n - Includes fully functional home button.\\n - Reload to reset page.";
  8. var todo = "TODO:\\n - A way to submit URLs by pressing Enter on the URL bar.\\n - A way to save the home URL.";
  9. var help = ()=> {
  10.     alert(version + "\\n" + news + "\\n" + features + "\\n" + todo);
  11. };
  12. var getHomepage = () => {
  13.     return homePage;
  14. };
  15. var setHomepage = ()=> {
  16.     homePage = prompt("Homepage?\\n(Cancel to reset to default.)", homePage);
  17.     if (!homePage) {
  18.         homePage = "https://web.archive.org";
  19.     }
  20. };`;
  21.  
  22. document.body.innerHTML = ``;
  23. var style = document.createElement("style");
  24. style.innerHTML = `
  25.     element {
  26.         border: 0;
  27.         margin: 0;
  28.         font-size:100%;
  29.         line-height:1;
  30.         font-family: "tahoma"
  31.     }
  32.     body {
  33.         border: 0;
  34.         margin: 0;
  35.     }
  36. `;
  37. document.body.appendChild(style);
  38.  
  39. var script = document.createElement("script");
  40. script.innerHTML = scriptString;
  41. document.body.appendChild(script);
  42.  
  43. document.body.innerHTML += `
  44. <div align="center">
  45.     <button onclick="help();" >?</button>
  46.      | <button onclick="setHomepage();" >Change</button>
  47.      <button onclick="loadedPage.src = homePage;" ></button>
  48.      | <input type="text" id="textBox" style="width: 40%" value="https://web.archive.org" ></input>
  49.     <button onclick="loadedPage.src = textBox.value;" >Go!</button>
  50.      | <button onclick="loadedPage.src += '';" ></button>
  51. </div>
  52.  
  53. <iframe id="loadedPage" onload="textBox.value = loadedPage.src" frameBorder="0" ` +
  54. `sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-presentation allow-same-origin allow-scripts" ` +
  55. `src="https://web.archive.org" width=100% height=96.5%>Your browser does not support ifpass, which uses IFrames. Please upgrade your browser.</iframe>
  56.  
  57. <noscript>Your browser does not support ifpass, which uses Javascript scripts. Please enable scripts.</noscript>
  58. `;
  59.  
  60. console.log(version + ". Pastebin: https://pastebin.com/RCwdNMKn");
Add Comment
Please, Sign In to add comment