Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. // ==UserScript==
  2. // @name HSLO ~saigo~ [PROD]
  3. // @description HSLO
  4. // @version 6.1.8
  5. // @author 2CL투샤르
  6. // @match *://agar.io/*
  7. // @run-at document-start
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. if (location.host === 'agar.io' && location.href !== 'https://agar.io/hslo') {
  12. location.href = 'https://agar.io/hslo';
  13. return;
  14. }
  15.  
  16. const HSLO = new class {
  17. constructor() {
  18. this.method = 'GET';
  19. this.URL = 'https://saigo.hslo.io/?v=618';
  20. this.HTML = ``;
  21. }
  22.  
  23. load() {
  24. this.setMessage();
  25. this.fetch();
  26. }
  27.  
  28. setMessage() {
  29. document.body.innerHTML = "LOADING...";
  30. }
  31.  
  32. fetch() {
  33. const request = new XMLHttpRequest();
  34. request.open(this.method, this.URL, true);
  35. request.onload = () => {
  36. this.HTML = request.responseText;
  37. this.write();
  38. };
  39. request.onerror = () => {
  40. document.body.innerHTML = "<div style='width: 100%; text-align: center; font-size: 24px; font-family: sans-serif;'>Failed to fetch HSLO files.</div>";
  41. }
  42. request.send();
  43. }
  44.  
  45. write() {
  46. document.open();
  47. document.write(this.HTML);
  48. document.close();
  49. }
  50. }
  51.  
  52. HSLO.load();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement