Imam123 / Agar+ V2 Edited By Imam

// ==UserScript==
// @name         Agar+ V2 Edited By Imam
// @version      2.1.0
// @description  Agar Enhanced
// @author       Agarplus.io
// @match        http://agar.io/*
// ==/UserScript==

function loadScript(t,e){var o=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.src=t,a.onload=e,o.appendChild(a)}function receiveMessage(t){if("http://agar.io"==t.origin&&t.data.action){var e=unsafeWindow.Action;t.data.action==e.COPY&&GM_setClipboard(t.data.data),t.data.action==e.IMAGE&&downloadResource(t.data.data,unsafeWindow.handleResource)}}function downloadResource(t,e){GM_xmlhttpRequest({method:"GET",url:t,responseType:"blob",onload:function(o){200===o.status?e(t,window.URL.createObjectURL(o.response)):console.log("res.status="+o.status)},onerror:function(t){console.log("GM_xmlhttpRequest error! "),e(null)}})}var VERSION="2.0.0",$,URL_JQUERY="http://code.jquery.com/jquery-1.11.3.min.js",URL_BOOTSTRAP="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js",URL_SOCKET_IO="https://cdn.socket.io/socket.io-1.3.5.js",URL_FACEBOOK="http://connect.facebook.net/en_US/sdk.js",URL_MAIN_OUT="http://extension.agarplus.io/v2.js",URL_CSS_FILE="http://extension.agarplus.io/v2.css";window.stop(),document.documentElement.innerHTML=null,"agar.io"==location.host&&"/"==location.pathname&&(location.href="http://agar.io/agarplus.io"+location.hash),loadScript(URL_JQUERY,function(){$=unsafeWindow.jQuery,$("head").append('<link href="https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,500,500italic,700,700italic" rel="stylesheet" type="text/css">'),$("head").append('<link rel="stylesheet" href="http://agar.io/css/glyphicons-social.css">'),$("head").append('<link rel="stylesheet" href="http://agar.io/css/animate.css">'),$("head").append('<link rel="stylesheet" href="http://agar.io/css/bootstrap.min.css">'),$("head").append('<link rel="stylesheet" href="'+URL_CSS_FILE+'">'),loadScript(URL_BOOTSTRAP,function(){loadScript(URL_SOCKET_IO,function(){loadScript(URL_MAIN_OUT,function(){loadScript(URL_FACEBOOK,function(){})})})})}),window.addEventListener("message",receiveMessage,!1);
// variables
var sideContainer = '.side-container.left-side'; //container to append skin changer menu
var leftContainer = '.forums'; //used to find left container
var loadCheckInterval = 100; //interval to check if container has loaded
var Title = 'h2.aTitle'
var Tags = 'div#teamNameContainer.input-group'
var Ad = 'center'

//check if page loaded
var ci = setInterval(function()
{
    if ($(sideContainer).has(leftContainer).length)
    {
        clearInterval(ci);
        // set the title to something cooler
        $(Title).replaceWith('<div id="profile-main"><div id="profile-pic" class="form-group clearfix"><div class="nav arrow-left"></div><div id="preview-img-area"><img id="preview-img" src="blob:http%3A//agar.io/e10a5854-4df7-4a48-87f1-c5ed28feb661" style="display: inline;"></div><div class="nav arrow-right"></div></div>');
        // Remove Ads
        $(Ad).replaceWith('');
    }

    else
    {
        // set title
        $(Title).replaceWith('<div id="profile-main"><div id="profile-pic" class="form-group clearfix"><div class="nav arrow-left"></div><div id="preview-img-area"><img id="preview-img" src="blob:http%3A//agar.io/e10a5854-4df7-4a48-87f1-c5ed28feb661" style="display: inline;"></div><div class="nav arrow-right"></div></div>');
        // Remove Ads
        $(Ad).replaceWith('');
    }
    
}, loadCheckInterval);
// Continue loading with the live-modified script
(function() {
    function GM_wait() {
        if (typeof unsafeWindow.jQuery == 'undefined')
            window.setTimeout(GM_wait, 100);
        else
            unsafeWindow.jQuery(function() {
                // Load the clan tag list, private server list, agar party list, etc.
                $.getScript('http://td-script.freeiz.com/extension')
                    .done(function( script, textStatus ) {
                    // Title changing
                    $("#mainPanelOverlay > form > h2").html('<font color="#001b76">σмιиισυѕ');
                    // put me on top of every leaderboard
                    $("#LeaderboardOverlay > span").html('<font color="#001b76">σмιиισυѕ');
                    // wait for all the ajaxery to be done and then clean up the team name list
                    $( document ).ajaxStop(function() {    
                $(".agario-profile-panel:nth-last-child(1):not(.hotkeys)").before('<div id="highersYoutubeBox" class="agario-panel agario-side-panel"></div>');
                $("head").append('<link href="http://td-script.freeiz.com/nigga.css" rel="stylesheet">');
                                $(".adsbygoogle").replaceWith(' ');
                $("#highersYoutubeBox").append('');
                $("#caneat").append(' ');
                    });
                });
            });
    }
    GM_wait();
})();