On Jan 23, 8:43 pm, danielslaughter <
slaughter.dan...@gmail.com>
wrote:
> That would be great if you could. It's in this script on line 26:
http://www.danielslaughter.com/projects/greasemonkey_gmailpop3/gmail_...
Yup, you've stumbled on the one case where eval is actually useful.
You could try replacing the line with the eval on it with this:
var txt = r.responseText;
o.core = JSON.parse(txt.substring(1, txt.length-1));
It probably won't work because the response text from your server
doesn't appear to be pure JSON(it contains actual JavaScript, not just
values). Perhaps you could modify the PHP script on your sever to
serve proper JSON and move whatever code you pass into the actual
userscript.
You could also assign the object declared remotely to a variable and
use an @require to include it in your script.