// ==UserScript==
// @name         m.io packet analyzer
// @version      0.0.1
// @description  Captures incoming and outgoing traffic between the Moomoo.io game server. 
// @author       The m.io project
// @match        http://moomoo.io/*
// @match		 http://moomootest-env.us-west-2.elasticbeanstalk.com/*
// @grant        GM_xmlhttpRequest
// @run-at       document-start
// ==/UserScript==

(() => {
	window.stop();
	const LOAD_LOCAL = (typeof localStorage['load_local_script'] !== 'undefined');
	var OUT = null;
	if (LOAD_LOCAL) {
		OUT = "http://127.0.0.1/m.io/packetAnalyzer/sniff.js";
	} else {
		OUT = 'https://rawgit.com/wwwwwwwwwwwwwwwwwwwwwwwwwwwwww/m.io/master/packetAnalyzer/sniff.js';
	}
	const SCRIPT_OUT = '<script src="' + OUT + '"></script>\n';
	GM_xmlhttpRequest({
		method: 'GET',
		url: 'http://moomoo.io/',
		onload: e => {
			document.open();
			document.write(SCRIPT_OUT + e.responseText);
			document.close();
		}
	});
})();
@@ -162,17 +162,16 @@
  server.
- 
 %0A// @aut
@@ -805,27 +805,28 @@
 rl: 
-'http://moomoo.io/'
+window.location.href
 ,%0A%09%09

Add dynamic URL requesting