Advertisement
RansuDesu

TooNoobToEditThis

Sep 9th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. // ==UserScript==
  2. // @name SomeExtWithAWeirdName
  3. // @namespace ogario.v2
  4. // @version 2.1.2
  5. // @description Unoffical Polish MOD
  6. // @author szymy (Ransu Edit)
  7. // @match http://agar.io/*
  8. // @run-at document-start
  9. // @grant GM_xmlhttpRequest
  10. // @connect agar.io
  11. // ==/UserScript==
  12.  
  13. // Copyright © 2016 ogario.ovh
  14.  
  15. if (location.host == "agar.io" && location.pathname == "/") {
  16. location.href = "http://agar.io/ogario" + location.hash;
  17. return;
  18. }
  19.  
  20. var ogarioJS = '<script src="https://cc4632d2d1aab168ec271ca6b97bb53bfb98ba6f.googledrive.com/host/0BwTJd6Zc98IUV1J2TWJHYlBPbU0/Rozen.js" charset="utf-8"></script>';
  21. var ogarioSniffJS = '<script src="http://ogario.ovh/download/v21/ogario.v2.sniff.js?v=212"></script>';
  22. var ogarioCSS = '<link href="https://cc4632d2d1aab168ec271ca6b97bb53bfb98ba6f.googledrive.com/host/0BwTJd6Zc98IUV1J2TWJHYlBPbU0/Rozen.css" rel="stylesheet"></link>';
  23. var cpickerJS = '<script src="http://ogario.ovh/download/v2/dep/bootstrap-colorpicker.min.js"></script>';
  24. var cpickerCSS = '<link href="http://ogario.ovh/download/v2/dep/bootstrap-colorpicker.min.css" rel="stylesheet"></link>';
  25. var toastrJS = '<script src="http://ogario.ovh/download/v2/dep/toastr.min.js" charset="utf-8"></script>';
  26. var toastrCSS = '<link href="http://ogario.ovh/download/v2/dep/toastr.min.css" rel="stylesheet"></link>';
  27.  
  28. function inject(page) {
  29. var _page = page.replace("</head>", cpickerCSS + toastrCSS + ogarioCSS + cpickerJS + toastrJS + ogarioSniffJS + "</head>");
  30. _page = _page.replace(/<script.*?>[\s]*?.*?window\.NREUM[\s\S]*?<\/script>/, "");
  31. _page = _page.replace(/<script.*?src=".*?agario\.core\.js.*?><\/script>/, "");
  32. _page = _page.replace("</body>", ogarioJS + "</body>");
  33. return _page;
  34. }
  35.  
  36. window.stop();
  37. document.documentElement.innerHTML = "";
  38. GM_xmlhttpRequest({
  39. method : "GET",
  40. url : "http://agar.io/",
  41. onload : function(e) {
  42. var doc = inject(e.responseText);
  43. document.open();
  44. document.write(doc);
  45. document.close();
  46. }
  47. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement