Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name DualPlus - By Theo
- // @version 1.7.0
- // @namespace Play my new Game http://igar.pw and http://igar.pw/plus
- // @description Peruvian Extension - By Theo
- // @author Theo
- // @youtube https://www.youtube.com/channel/UCPDOTXtvwvrHwUSO6B4huaw
- // @match http://dual-agar.me/*
- // @match http://dual-agar.online/*
- // @updateURL http://theoxt.com/extensiones/dualplus_ext/install.user.js
- // @downloadURL http://theoxt.com/extensiones/dualplus_ext/install.user.js
- // @run-at document-start
- // @grant GM_xmlhttpRequest
- // ==/UserScript==
- if (location.host == "dual-agar.online" || location.href == "http://dual-agar.me/") {
- window.location = "http://dual-agar.me/dualplus";
- } else {
- if (location.host == "dual-agar.me" && location.pathname == "/dualplus/") {
- location.href = "http://dual-agar.me/dualplus/crowns" + location.hash;
- return;
- }
- var URL_MAIN_OUT = "http://theoxt.com/extensiones/dualplus_ext/script.js?version=160";
- var URL_STYLE = "http://theoxt.com/extensiones/dualplus_ext/style.css";
- var SWEET_ALERT_CSS = "https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.7.0/sweetalert2.min.css";
- var SWEET_ALERT_JS = "https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.7.0/sweetalert2.min.js";
- window.stop();
- document.documentElement.innerHTML = "";
- "dual-agar.me" == location.host && "/dualplus/" == location.pathname && (location.href = "http://dual-agar.me/dualplus/crowns" + location.hash);
- GM_xmlhttpRequest({
- method : "GET",
- url : "http://dual-agar.me/dualplus/",
- onload : function(e) {
- var doc = injectFiles(e.responseText);
- document.open();
- document.write(doc);
- document.close();
- }
- });
- }
- function injectFiles(page) {
- page = page.replace(/<script.*?src=\".*?mod.js\"><\/script>/, tagScript(SWEET_ALERT_JS) + tagScript(URL_MAIN_OUT));
- page = page.replace(/<link.*?href=\".*?dualplus.css\">/, tagStyle(SWEET_ALERT_CSS) + tagStyle(URL_STYLE));
- return page;
- }
- function tagStyle(url) {
- return '<link href="' + url + '" rel="stylesheet">';
- }
- function tagScript(url) {
- return '<script src="' + url + '"></script>';
- }
Add Comment
Please, Sign In to add comment