Userscript works in Firefox + Greasemonkey, not on Chrome + Tampermonkey or just plain Chrome -
Userscript works in Firefox + Greasemonkey, not on Chrome + Tampermonkey or just plain Chrome -
i have written script works in firefox. whenever utilize in chrome, doesn't anything. gives me error:
uncaught referenceerror: uneval not defined
how prepare this?
function inject(func) { window.location = 'javascript:(' + encodeuricomponent(uneval(func)) + ')();'; } inject(function() { var alt = window.alert; window.alert = function(s) { if (!string(s).match(/error: unable connect api/)) { alt.apply(window, arguments); } }; // ping angel server every 5 minutes window.settimeout(function() { if (window.angel && angel.sessiontimer) { angel.sessiontimer.reset(); angel.sessiontimer.extendsession(); } window.settimeout(arguments.callee, 5 * 60 * 1000); }, 5 * 60 * 1000); });
according mnd documentation uneval()
supported on firefox.
how prepare this?
i suggest utilize function.prototype.tostring()
instead.
google-chrome userscripts
Comments
Post a Comment