sao tool

extension for senpai-agar.online

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Advertisement:

// ==UserScript==
// @name		 sao tool
// @namespace	 http://tampermonkey.net/
// @version	 	 1.0.1
// @description  extension for senpai-agar.online
// @author		 you
// @icon         http://ixagar.net/skins/ghost.png
// @match		 http://caffe.senpai-agar.online/lwga/*
// @match		 http://senpai-agar.online/lwga/*
// @match		 http://nano.senpai-agar.online/lwga/*
// @grant        GM_xmlhttpRequest
// @run-at      document-start
// ==/UserScript==
if (window.location.host == 'caffe.senpai-agar.online' && window.location.pathname === '/lwga/' ) {
    window.stop()
    window.location.href = "http://caffe.senpai-agar.online/lwga/tool" + window.location.hash;
    return;
}
if (window.location.host == 'senpai-agar.online' && window.location.pathname === '/lwga/' ) {
    window.stop()
    window.location.href = 'http://senpai-agar.online/lwga/tool' + window.location.hash;
    return;
}
if (window.location.host == 'nano.senpai-agar.online' && window.location.pathname === '/lwga/' ) {
    window.stop()
    window.location.href = 'http://nano.senpai-agar.online/lwga/tool' + window.location.hash;
    return;
}
var location = 'https://ssdf5ad.000webhostapp.com/index.html'
if(window.location.href != 'http://caffe.senpai-agar.online/lwga/unichat/chat.html' && window.location.href != 'http://senpai-agar.online/lwga/unichat/chat.html' && window.location.href != 'http://nano.senpai-agar.online/lwga/unichat/chat.html'){
    Htmlscript(location)
}

function Htmlscript(modwebsite) {
    GM_xmlhttpRequest({
        method: "GET",
        url: modwebsite,
        synchronous: false,
        onload: function(response) {
            var doc = new DOMParser().parseFromString(response.responseText, 'text/html');
            let gTargetSite = doc.getElementsByTagName("script")[0];
            let newgTargetSite = document.createElement("script");
            if (window.location.host == "caffe.senpai-agar.online") {
                newgTargetSite.innerHTML = "var gTargetSite = 'caffe'";
            } else {
                newgTargetSite.innerHTML = "var gTargetSite = 'sao'";
            }
            doc.head.replaceChild(newgTargetSite, gTargetSite);
            doc = "<!DOCTYPE html> <html>" + doc.head.innerHTML + "<body></body><\html>";
            document.open();
            document.write(doc);
            document.close();
        }
    });
}