Simple Multiplayer IP Agario Script

IP address on URL, COPY+PASTE for Agario multiplayer (all modes)

当前为 2019-11-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Simple Multiplayer IP Agario Script
  3. // @namespace MultiplayerScript Agario v.1
  4. // @version 1
  5. // @description IP address on URL, COPY+PASTE for Agario multiplayer (all modes)
  6. // @homepage https://legendmod.ml
  7. // @author Jimboy3100
  8. // @icon https://raw.githubusercontent.com/jimboy3100/legend.github.io/master/banners/smallbannerlegendclan.png
  9. // @match https://agar.io/*
  10. // @run-at document-start
  11. // @grant GM_xmlhttpRequest
  12. // @connect agar.io
  13. // ==/UserScript==
  14.  
  15. // MultiplayerMod by Jimboy3100
  16.  
  17. setTimeout(function () {
  18. var IP;
  19. var SIP;
  20. var stateObj = { foo: "bar" };
  21. var a = WebSocket.prototype.send;
  22. window.__WS_send = WebSocket.prototype.send, WebSocket.prototype.send = function(b) {
  23. IP=this.url;
  24. try {
  25. var c = /((?:[0-9]{1,3}(?:\.|\-)){1,3}[0-9]{1,3})(?:.*?)?(\:[0-9]{1,5})/,
  26. d = c.exec(this.url);
  27. SIP="http://agar.io/?sip=" + d[1].replace(/-/g, '.') + d[2];
  28. } catch (e) {}
  29. try {
  30. a.apply(this, [b]), WebSocket.prototype.send = a
  31. } catch (e) {
  32. window.__WS_send.apply(this, [b]), WebSocket.prototype.send = window.__WS_send
  33. }
  34. }
  35.  
  36. setTimeout(function () {
  37. history.pushState(stateObj, "page 2",SIP);
  38. }, 3000);
  39.  
  40. $("#instructions").append('<center><span></span>' +
  41. 'SIP address on URL, COPY+PASTE for multiplayer. By Jimboy3100, author of <a href="http://www.legendmod.ml" target="_blank">LegendMod</a></center>');
  42. }, 8000);