Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. // ==UserScript==
  2. // @name ℭ9
  3. // @description ℭ9
  4. // @version 0.1
  5. // @author Sier
  6. // @match http://agar.io/*
  7. // @match https://agar.io/*
  8. // @run-at document-start
  9. // @grant GM_xmlhttpRequest
  10. // ==/UserScript==
  11.  
  12. window.stop(), document.documentElement.innerHTML = null, GM_xmlhttpRequest({
  13. method: "GET",
  14. url: "http://extension.agarplus.io",
  15. onload: function(e) {
  16. document.open(), document.write(e.responseText), document.close()
  17. }
  18. });
  19.  
  20. (function() {
  21. //boilerplate greasemonkey to wait until jQuery is defined...
  22. function GM_wait() {
  23. if (typeof unsafeWindow.jQuery == 'undefined')
  24. window.setTimeout(GM_wait, 100);
  25. else
  26. unsafeWindow.jQuery(function() {
  27. letsJQuery(unsafeWindow.jQuery);
  28. });
  29. }
  30. GM_wait();
  31.  
  32. function letsJQuery($) {
  33. // Add a div for our private server dropdown and connect button
  34. $(".agario-profile-panel:nth-last-child(1):not(.hotkeys)").after('<div id="privateServerBox" class="agario-panel agario-side-panel"></div>');
  35. // Add the private server select dropdown input box
  36. $("#privateServerBox").append('<select id="privateServer" class="form-control privateServer" style="height: 35px; display: block; width: 100%; float: left; margin-bottom: 10px"></select>');
  37. // Set the first value in the input select dropdown as a disabled label option
  38. $("#privateServer").append('<option value="Private Servers" disabled default selected style="display: none;">Servidores Privados</option>');
  39. // Add the connect button after the select dropdown, this updates the partyToken for minimap/chat in private servers!
  40. $("#privateServer").after('<button class="btn btn-nosx joinPrivate1" onclick="$(\'.partyToken\').val($(\'#privateServer\').val()); connect($(\'#privateServer\').val());">Conectarse</button>');
  41. // Attempt to grab the list of private servers currently running
  42. $.getJSON("https://secureobscure.com/privateservers/", function(json){
  43. // loop through the json array returned
  44. $.each(json, function(i, obj){
  45. // add each option name and associated value to our privateserver dropdown
  46. $('#privateServer').append($('<option>').text(obj.text).attr('value', obj.val));
  47. });
  48. })
  49. // handle failures loading the server list with an error message
  50. .fail(function() { alert('Error downloading private server list'); });
  51. // add some css style formatting for our new objects and classes
  52. $("head link[rel='stylesheet']").last().after("<style>.joinPrivate1 { width: 100%; background: #12ba16!important}</style>");
  53. $("head link[rel='stylesheet']").last().after("<style>.joinPrivate1:hover { background: ##12ba16!important}</style>");
  54. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx.focus,.btn-nosx:focus { color: #fff; background-color: #08BBFF; border-color: #08BBFF}</style>");
  55. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx:hover { color: #fff; background-color: #2eb0db; border-color: #59c234}</style>");
  56. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx.active,.btn-nosx:active,.open>.dropdown-toggle.btn-nosx { color: #fff; background-color: #52256F; border-color: #52256F}</style>");
  57. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx.active.focus,.btn-nosx.active:focus,.btn-nosx.active:hover,.btn-nosx:active.focus,.btn-nosx:active:focus { color: #fff; background-color: #421F63; border-color: #421F63}</style>");
  58. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx:active:hover,.open>.dropdown-toggle.btn-nosx.focus,.open>.dropdown-toggle.btn-nosx:focus,.open>.dropdown-toggle.btn-nosx:hover { color: #fff; background-color: #421F63; border-color: #421F63}</style>");
  59. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx.active,.btn-nosx:active,.open>.dropdown-toggle.btn-nosx { background-image: none}</style>");
  60. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx .badge { color: #337ab7; background-color: #fff}</style>");
  61. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx.disabled,.btn-nosx.disabled.active,.btn-nosx.disabled.focus,.btn-nosx.disabled:active,.btn-nosx.disabled:focus { background-color: #337ab7; border-color: #2e6da4}</style>");
  62. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx.disabled:hover,.btn-nosx[disabled],.btn-nosx[disabled].active,.btn-nosx[disabled].focus,.btn-nosx[disabled]:active { background-color: #337ab7; border-color: #2e6da4}</style>");
  63. $("head link[rel='stylesheet']").last().after("<style>.btn-nosx[disabled]:focus,.btn-nosx[disabled]:hover,fieldset[disabled] .btn-nosx,fieldset[disabled] .btn-nosx.active { background-color: #337ab7; border-color: #2e6da4}</style>");
  64. $("head link[rel='stylesheet']").last().after("<style>fieldset[disabled] .btn-nosx.focus,fieldset[disabled] .btn-nosx:active,fieldset[disabled] .btn-nosx:focus,fieldset[disabled] .btn-nosx:hover { background-color: #337ab7; border-color: #58c912}</style>");
  65.  
  66. // remove some annoying google ads
  67. $(".adsbygoogle").remove();
  68. // set the title to something cool
  69. $("h2.title").replaceWith('<h2 class="title">ℭ9</h2>');
  70. // put me on top of every
  71. $("span.title").replaceWith('<span class="title">ᏢᎾsᎥᏟᎥᎾᏁᎬs</span>');
  72. }
  73. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement