Alesia1

Untitled

May 27th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Agario Extension
  3. // @version 1
  4. // @description yaser extension
  5. // @namespace yaser.agar
  6. // @author ysr , vnx
  7. // @match *://agar.io/*
  8. // @run-at document-start
  9. // @connect cdn.ogario.ovh
  10. // @connect ogar.io
  11. // @connect extension.yaseragar.ml
  12. // @connect ogar.ovh
  13. // @grant GM.xmlHttpRequest
  14. // ==/UserScript==
  15.  
  16. if (location.host == 'agar.io' && location.pathname === '/' ) {
  17. location.href = 'https://agar.io/agario';
  18. return;
  19. }
  20.  
  21. var mode = location.pathname.slice(1)
  22. var url;
  23. switch(mode){
  24. case 'ogario':
  25. url = 'https://cdn.ogario.ovh/v4/beta/'
  26. break;
  27. case 'extension':
  28. url = 'https://extension.yaseragar.ml/extension.html'
  29. break;
  30. case 'dev': url = 'http://ogar.ovh/index.html'
  31. break;
  32. window.stop();
  33. break;
  34. default: url = 'https://extension.yaseragar.ml/extension.html'
  35. console.log(mode)
  36.  
  37. }
  38.  
  39.  
  40. document.documentElement.innerHTML = "Loading";
  41. if(mode=='none'){
  42. document.open();
  43. document.write('Hello');
  44. document.close();
  45. }else{
  46. GM.xmlHttpRequest({
  47. method: "GET",
  48. url: url,
  49. onload: function(e) {
  50. var D = window.document;
  51. var newDoc = D.implementation.createHTMLDocument();
  52. D.replaceChild (
  53. D.importNode (newDoc.documentElement, true),
  54. D.documentElement
  55. );
  56. document.open();
  57. document.write(e.response);
  58. document.close();
  59.  
  60. }
  61. });
  62. }
Add Comment
Please, Sign In to add comment