Facebook
From Scorching Zebra, 3 Years ago, written in JavaScript.
This paste is a reply to extention from wwwdwh - view diff
Embed
Download Paste or View Raw
Hits: 104
  1. // ==UserScript==
  2. // @name         HSLO Endymion
  3. // @description  HSLO Endymion The Ultimate Multiboxing Experience
  4. // @version      10.1
  5. // @author       test114514
  6. // @match        *://agar.io/*
  7. // @require      https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
  8. // @updateURL    https://hslo.sigr.io/userscript.js
  9. // @run-at       document-start
  10. // @grant        none
  11. // ==/UserScript==
  12.  
  13. if (location.host === 'agar.io' && location.href !== 'https://agar.io/hslo') {
  14.     location.href = 'https://agar.io/hslo';
  15.     return;
  16. }
  17.  
  18. const HSLO = new class {
  19.     constructor() {
  20.         this.method = 'GET';
  21.         this.URL = 'https://hslo.sigr.io/';
  22.         this.HTML = ``;
  23.         this.date = Date.now();
  24.     }
  25.  
  26.     load() {
  27.         this.setMessage();
  28.         this.fetch();
  29.     }
  30.  
  31.     setMessage() {
  32.         document.body.innerHTML = "LOADING...";
  33.     }
  34.  
  35.     fetch() {
  36.         const request = new XMLHttpRequest();
  37.         request.open(this.method, this.URL + "?date=" + this.date, true);
  38.         request.onload = () => {
  39.             this.HTML = request.responseText;
  40.             this.write();
  41.         };
  42.         request.onerror = () => {
  43.             document.body.innerHTML = "<div style='width: 100%; text-align: center; font-size: 24px; font-family: sans-serif;'>Failed to fetch HSLO files.</div>";
  44.         }
  45.         request.send();
  46.     }
  47.  
  48.     write() {
  49.         document.open();
  50.         document.write(this.HTML);
  51.         document.close();
  52.     }
  53. }
  54. HSLO.load();