We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GM_*
abort
GM.xmlHttpRequest
I have installed Greasemonkey 4.11 from Firefox Store. Firefox 100.0.2. The same with 91.9.1esr.
GM_xmlhttpRequest, GM_log do not exist. GM.xmlHttpRequest does not return {abort} object.
GM_xmlhttpRequest
GM_log
{abort}
The example from 2015 year' issue — #2154:
// ==UserScript== // @name Abort Test // @namespace gmscripts // @include http*://*/* // @grant GM_log // @grant GM.xmlHttpRequest // @grant GM_xmlhttpRequest // ==/UserScript== const req = GM_xmlhttpRequest({ // ReferenceError: GM_xmlhttpRequest is not defined //const req = GM.xmlHttpRequest({ // It works. method: "GET", url: "https://github.com/", onload(gmResponse) { console.log(gmResponse.responseText); }, onabort() { console.log("on abort"); } }); req.abort(); // TypeError: req is undefined GM_log("completed"); // ReferenceError: GM_log is not defined
...does not work.
What's the problem?
I think it should work.
The text was updated successfully, but these errors were encountered:
Starting at version 4, there isn't GM_* anymore. https://wiki.greasespot.net/GM.xmlHttpRequest
GM.* returns a promise. That is the reason why you don't have req.abort()
GM.*
req.abort()
I haven't tested it, but try using:
(async function () { const req = await GM_xmlhttpRequest(...); req.abort() })()
or
GM_xmlhttpRequest(...).then(req => req.abort())
Sorry, something went wrong.
No branches or pull requests
I have installed Greasemonkey 4.11 from Firefox Store.
Firefox 100.0.2. The same with 91.9.1esr.
GM_xmlhttpRequest
,GM_log
do not exist.GM.xmlHttpRequest
does not return{abort}
object.The example from 2015 year' issue — #2154:
...does not work.
What's the problem?
I think it should work.
The text was updated successfully, but these errors were encountered: