Questions tagged [gm-xmlhttprequest]

GM_xmlhttpRequest is a method available to GreaseMonkey scripts. It can be used to fetch cross-site HTTP requests.

GM_xmlhttpRequest is a method available to Greasemonkey scripts. The function does not suffer from the same-origin policy.

58 questions
1
vote
0 answers

Using GM_xmlhttpRequest produces XrayWrapper denied access

I'm trying to get info from a cross domain webpage using GM_xmlhttpRequest. It keeps on producing the following error: XrayWrapper denied access to property onload (reason: value is callable). See…
Matthew R
  • 11
  • 3
1
vote
1 answer

How to submit to a basic, external form page using GM_xmlhttpRequest?

I created a basic script for Greasemonkey in order to search for the word test on Stack Overflow. According to GM_xmlhttpRequest documentation, parameters for the request should be indicated in the data argument. // ==UserScript== // @name …
Delgan
  • 18,571
  • 11
  • 90
  • 141
1
vote
1 answer

GM Cross domain Ajax not working

Trying to prepopulate a form on a client's website with data from our database using a greasemonkey script, but i can't figure out how to get around the same origin policy.. I am using GM_xmlhttpRequest nd even specified @grant GM_xmlhttpRequest but…
1
vote
1 answer

Looping GM_xmlhttpRequest gives "TypeError Null" on a variable

I have some links in a page. I want to count the responses of each link and insert the numbers in front of the links. Here is what I have: var links = document.evaluate('..../td[1]/font//a[@href]', document, null,…
1
vote
0 answers

XMLHttpRequest is not allowed by Access-Control-Allow-Origin in .safariextz file

I am getting following error in error console, facing this issue for many days, please help. XMLHttpRequest cannot load "localhost Url". Origin https://mail.google.com is not allowed by Access-Control-Allow-Origin. My purpose is to get an image…
1
vote
1 answer

Why is GM_xmlhttpRequest ignoring its data parameter?

According to its documentation, GM_xmlhttpRequest should be able to take a data parameter as part of its argument. However, I can't seem to get it to work. I have a simple server that echoes the parameters given to it: require 'sinatra' require…
rampion
  • 87,131
  • 49
  • 199
  • 315
1
vote
3 answers

How to find the request-URL from inside Greasemonkey's GM_xmlhttpRequest "onload" callback in case of 302 redirect?

I have a GM_xmlhttpReqeust function setup as follows (simplified version) in my Greasemonkey script. GM_xmlhttpRequest({ synchronous: false, method: "HEAD", url: "http://www.example1.com", onload:…
gsbabil
  • 7,505
  • 3
  • 26
  • 28
1
vote
3 answers

"getElementById not a function" when trying to parse an AJAX response?

I'm running GM_xmlhttpRequest (in a Greasemonkey script) and storing the responseText into a newly created HTML element: var responseHTML = document.createElement('HTML'); ... onload: function() { responseHTML.innerHTML = response.responseText;…
0
votes
0 answers

GM_xmlhttpRequest loses data in jQuery .each() statement

I've some pages with URL like this: www.example.com/index.php?id={a number} and each page has the same
0
votes
1 answer

Can't send data with GM_xmlhttpRequest from Tampermonkey with POST method to Scalatra

... it answers: 500 Server error; java.lang.NoSuchMethodError: 'void org.scalatra.servlet.RichRequest.update(java.lang.Object, java.lang.Object)' at... at... at... ... My code: const ajaxobj = { method: "POST" , url: url …
Laca
  • 57
  • 1
  • 6
0
votes
1 answer

Tampermonkey GM_xmlhttpRequest not sending Request properly

I am trying to implement a tampermonkey script that triggers an API call to a Jira instance to create a ticket with some information found in the page I am on (on a different domain). Here's what I've tried: async function createJiraTicket() { …
0
votes
0 answers

Simple script with GM_xmlhttpRequest in tampermonkey running every seconds - memory leak

I have running tampermonkey script running every seconds - doing request to server to get data, data is there only around 0.1% of time, when data is there - it is making another ajax request using jQuery $.ajax Now, running this is making firefox…
0
votes
0 answers

How to understand GM_xmlhttpRequest parameter "binary"

I tested below code: `GM_xmlhttpRequest({ method: 'POST', url: "some url", data: "a1b2", binary: false}); GM_xmlhttpRequest({ method: 'POST', url: "some…
frank
  • 1,252
  • 1
  • 12
  • 17
0
votes
1 answer

How to see the link of the website it redirects to while using GM_xmlhttpRequest

Imagine you are on a website called "www.yourWebsite.com", and you're using userscripts in Tampermonkey to get information from another website. In this case, you are using the GM_xmlhttpRequest function. When you're using the GM_xmlhttpRequest…
0
votes
1 answer

GM.xmlHttpRequest: Received no URL Error

This script is run on a Amazon deals page: // ==UserScript== // @name Unnamed Script 138015 // @version 1 //@include http://www.amazon.in/* // @grant GM_setValue // @grant GM_getValue // @grant GM.xmlHttpRequest //…