I'm seriously struggling trying to resolve an issue with my script. Whatever I try and do GM.xmlHttpRequest throws error "is not a function".
The rest of my code works fine.
This is an abridged version of my code:
// ==UserScript==
// @name FUT20 Autobuyer Menu
// @namespace http://tampermonkey.net/
// @version 0.6
// @description try to take over the world!
// @author Rastor
// @match https://www.easports.com/uk/fifa/ultimate-team/web-app/*
// @match https://www.easports.com/fifa/ultimate-team/web-app/*
// @grant GM.xmlHttpRequest
// ==/UserScript==
try {
GM.xmlHttpRequest({
method: "GET",
url: "http://www.example.com/",
onload: function(response) {
alert(response.responseText);
}
});
}
catch (err) {
console.log(err);
}
In Tampermonkey it is GM_xmlhttpRequest (underscore not dot) as the privilege and function name!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With