Closed SrNicolas closed 8 years ago
It's easy
wan't to help? cuz I just cant get it to work
// manifest.json
{ "manifest_version": 2, "name": "Expose", "version": "0.1", "browser_action": { "default_title": "Expose" }, "content_scripts": [ { "matches": ["http://agar.io/*"], "js": ["content.js" ], "run_at": "document_start" } ], "web_accessible_resources": [ "expose.js"] }
//expose.js
(function() {
// Paste https://github.com/xzfc/agar-expose/blob/master/expose.user.js code here
window.onerror = function(msg) {
if(msg=='Uncaught TypeError: window.setGameMode is not a function'){window.location.reload();}
return true;
}
}())
// content.js
var s = document.createElement('script'); s.src = chrome.extension.getURL('expose.js'); s.onload = function() { this.parentNode.removeChild(this); }; (document.head||document.documentElement).appendChild(s);
Ifk if it's me por This conde Can't work with extensions, because I tried and got no luck making this work IN A Google chrome extenaion