Agar.io Gold

Better than ever! Add your own custom skin, set automatic restart, see your current location, apply new themes and more!

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name			Agar.io Gold
// @namespace		agar.io/gold
// @version			1.1.1
// @description		Better than ever! Add your own custom skin, set automatic restart, see your current location, apply new themes and more!
// @match			http://agar.io/*
// @connect			agar.io
// @run-at			document-start
// @grant			GM_xmlhttpRequest
// ==/UserScript==

var javascript = "<script type='text/javascript' src='https://greasyfork.org/scripts/22343-javascript/code/javascript.js?version=147287'></script>";

function inject(page){
	var newPage = page;
	newPage = newPage.replace(/<script.*?>[\s]*?.*?window\.NREUM[\s\S]*?<\/script>/i, '');
	newPage = newPage.replace(/<script.*?src=".*?agario\.core\.js.*?><\/script>/i, '');
	newPage = newPage.replace('</body>', javascript + '</body>');
	return newPage;
}

window.stop();
document.documentElement.innerHTML = null;
GM_xmlhttpRequest({
	method: 'GET',
	url: 'http://agar.io/',
	onload: function(e){
		var doc = inject(e.responseText);
		document.open();
		document.write(doc);
		document.close();
	}
});