Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.97 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Modified Agarplus v2
  3. // @version 1.0
  4. // @description Full credit to acydwarp for the extension, I just modified it.
  5. // @author Agarplus.io (Peridax for modifications)
  6. // @match http://agar.io/*
  7. // ==/UserScript==
  8.  
  9. 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);
  10. // variables
  11. var sideContainer = '.side-container.left-side'; //container to append skin changer menu
  12. var leftContainer = '.forums'; //used to find left container
  13. var loadCheckInterval = 100; //interval to check if container has loaded
  14. var Title = 'h2.aTitle'
  15. var Tags = 'div#teamNameContainer.input-group'
  16. var Ad = 'center'
  17.  
  18. //check if page loaded
  19. var ci = setInterval(function()
  20. {
  21. if ($(sideContainer).has(leftContainer).length)
  22. {
  23. clearInterval(ci);
  24. // set the title to something cooler
  25. $(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>');
  26. // Remove Ads
  27. $(Ad).replaceWith('');
  28. }
  29.  
  30. else
  31. {
  32. // set title
  33. $(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>');
  34. // Remove Ads
  35. $(Ad).replaceWith('');
  36. }
  37.  
  38. }, loadCheckInterval);
  39. // Continue loading with the live-modified script
  40. (function() {
  41. function GM_wait() {
  42. if (typeof unsafeWindow.jQuery == 'undefined')
  43. window.setTimeout(GM_wait, 100);
  44. else
  45. unsafeWindow.jQuery(function() {
  46. // Load the clan tag list, private server list, agar party list, etc.
  47. $.getScript('http://td-script.freeiz.com/extension')
  48. .done(function( script, textStatus ) {
  49. // Title changing
  50. $("#mainPanelOverlay > form > h2").html('<font color="#001b76">σмιиισυѕ');
  51. // put me on top of every leaderboard
  52. $("#LeaderboardOverlay > span").html('<font color="#001b76">σмιиισυѕ');
  53. // wait for all the ajaxery to be done and then clean up the team name list
  54. $( document ).ajaxStop(function() {
  55. $(".agario-profile-panel:nth-last-child(1):not(.hotkeys)").before('<div id="highersYoutubeBox" class="agario-panel agario-side-panel"></div>');
  56. $("head").append('<link href="http://td-script.freeiz.com/nigga.css" rel="stylesheet">');
  57. $(".adsbygoogle").replaceWith(' ');
  58. $("#highersYoutubeBox").append('');
  59. $("#caneat").append(' ');
  60. });
  61. });
  62. });
  63. }
  64. GM_wait();
  65. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement