have a strange issue with the Tor browser and Violentmonkey,
this script:
// ==UserScript==
// @name New script
// @namespace Violentmonkey Scripts
// @match https://example.org/
// @grant GM_xmlhttpRequest
// @run-at document-end
// @version 1.0
// @author -
// @description 4/18/2022, 4:00:43 PM
// ==/UserScript==
"use strict";
try {
(function() {
"use strict";
GM_xmlhttpRequest({
method: "GET",
synchronous: false,
url: "http://127.0.0.1/",
onload: function() {
alert("loaded!");
},
onerror: function(err) {
alert("GM_xmlhttpRequest error");
console.log(err);
}
});
})();
} catch (ex) {
alert("greasemonkey crashed! " + ex);
}
works fine on Firefox, but on Tor browser, the "onload" is never called, and the "onerror" is called with this object
{
"finalUrl": "http://127.0.0.1/",
"responseHeaders": "",
"readyState": 4,
"status": 0,
"statusText": "",
"response": "",
"responseText": "",
"lengthComputable": false,
"loaded": 0,
"total": 0
}
and no error in the console, and the actual http request is never sent.. and the onerror argument doesn't seem to contain any useful info about why the request failed. this happens both with "NoScript"+"HTTPS Everywhere" enabled and disabled (it makes no difference)... hence the question, how do i load localhost with GM_xmlhttpRequest on the TOR browser?