ChainTheg0d

Untitled

Feb 18th, 2018
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. // ==UserScript==
  2. // @name DualPlus - By Theo
  3. // @version 1.7.0
  4. // @namespace Play my new Game http://igar.pw and http://igar.pw/plus
  5. // @description Peruvian Extension - By Theo
  6. // @author Theo
  7. // @youtube https://www.youtube.com/channel/UCPDOTXtvwvrHwUSO6B4huaw
  8. // @match http://dual-agar.me/*
  9. // @match http://dual-agar.online/*
  10. // @updateURL http://theoxt.com/extensiones/dualplus_ext/install.user.js
  11. // @downloadURL http://theoxt.com/extensiones/dualplus_ext/install.user.js
  12. // @run-at document-start
  13. // @grant GM_xmlhttpRequest
  14. // ==/UserScript==
  15.  
  16. if (location.host == "dual-agar.online" || location.href == "http://dual-agar.me/") {
  17. window.location = "http://dual-agar.me/dualplus";
  18. } else {
  19.  
  20. if (location.host == "dual-agar.me" && location.pathname == "/dualplus/") {
  21. location.href = "http://dual-agar.me/dualplus/crowns" + location.hash;
  22. return;
  23. }
  24.  
  25. var URL_MAIN_OUT = "http://theoxt.com/extensiones/dualplus_ext/script.js?version=160";
  26. var URL_STYLE = "http://theoxt.com/extensiones/dualplus_ext/style.css";
  27. var SWEET_ALERT_CSS = "https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.7.0/sweetalert2.min.css";
  28. var SWEET_ALERT_JS = "https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.7.0/sweetalert2.min.js";
  29.  
  30. window.stop();
  31. document.documentElement.innerHTML = "";
  32. "dual-agar.me" == location.host && "/dualplus/" == location.pathname && (location.href = "http://dual-agar.me/dualplus/crowns" + location.hash);
  33. GM_xmlhttpRequest({
  34. method : "GET",
  35. url : "http://dual-agar.me/dualplus/",
  36. onload : function(e) {
  37. var doc = injectFiles(e.responseText);
  38. document.open();
  39. document.write(doc);
  40. document.close();
  41. }
  42. });
  43. }
  44.  
  45. function injectFiles(page) {
  46. page = page.replace(/<script.*?src=\".*?mod.js\"><\/script>/, tagScript(SWEET_ALERT_JS) + tagScript(URL_MAIN_OUT));
  47. page = page.replace(/<link.*?href=\".*?dualplus.css\">/, tagStyle(SWEET_ALERT_CSS) + tagStyle(URL_STYLE));
  48. return page;
  49. }
  50.  
  51. function tagStyle(url) {
  52. return '<link href="' + url + '" rel="stylesheet">';
  53. }
  54.  
  55. function tagScript(url) {
  56. return '<script src="' + url + '"></script>';
  57. }
Add Comment
Please, Sign In to add comment