GM_xmlhttpRequest no longer working

in Script development
Subscribe to GM_xmlhttpRequest no longer working 3 posts, 2 voices



mulandro User
SafariMacintosh

GM_xmlhttpRequest({

method: "POST",
url: "*my_server*",
headers: {'Content-type': 'application/x-www-form-urlencoded'},
data: "data=" + JSON.stringify(LGH_gameInfo),
onload: LGH_receiveUserToken
});

console.log('this doesn't print to the console');

a few weeks ago my script stopped working. for some reason it dies at this block (no http requests reach my server and the console.log statement doesn't print). there were no changes made to the script when it stopped working so i'm at a loss as to why it happened. Obviously, *my_server* is a properly formatted string representing a real url that exists. Changing the data string doesn't seem to have any effect on the situation at all.

FF 15.0.1 on mac 10.7.5 with GM 1.1

any thoughts as to why this might be happening?

 
mike cupcake Scriptwright
FirefoxWindows

Did it previously work in GM v1.x? Are you aware of @grant ?
http://wiki.greasespot.net/@grant

 
mulandro User
SafariMacintosh

That did it.

// @grant GM_xmlhttpRequest

I had:

// @grant GM_getValue
// @grant GM_setValue

already but adding the GM_xmlhttpRequest grant fixed the problem.

Thanks