All Questions
Tagged with firefox-addon-webextensions xmlhttprequest
14 questions
1
vote
0
answers
233
views
Get response data from intercepted http request [duplicate]
I'm using Firefox, and creating a personal web extension. I'm trying to get the data returned by GET requests sent out by a website. I can successfully intercept the requests using the background ...
0
votes
1
answer
429
views
firefox extension browser.webRequest.onBeforeRequest not redirecting after getting asynchronous response
here is my code that call a function to redirect the page using browser.webRequest.onBeforeRequest
browser.webRequest.onBeforeRequest.addListener(
redirect,
{
urls: ["<all_urls>"],
...
5
votes
1
answer
827
views
Override functions of the page in a Firefox extension content script
I make a firefox extension that get all the request url's and displays them. But the code only works if I paste it in the console.
when the extension loads it doesn't show any error, it seems like it ...
1
vote
0
answers
371
views
Firefox extension dev: howto fix wrong "Referer" in XMLHttpRequest
I am trying to program a simple Firefox (66.0 Quantum) Extension intended to download complete HLS video streams. The basic approach is to start video-playback using the page's regular UI ...
1
vote
1
answer
351
views
Webextension: How to transparently modify XMLHttpRequests
My goal
… is to have a web extension (in Firefox for now) that intercepts and modified XMLHttpRequests issues by a site as transparently as possible. Best case is that the extension is undetectable ...
0
votes
1
answer
579
views
Xhr from extension is blocked despite the <all_urls> manifest permission
As I learned from https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions#Host_permissions to make unrestricted cors request it should be enough to have host ...
0
votes
2
answers
2k
views
how to GET local file information with fetch API for a firefox extension
I am attempting to import a local csv file into my firefox extension background.js script.
So far my script looks like this:
fetch('http://localhost:8080/folder1/myFile.csv').then(function(response) ...
2
votes
1
answer
140
views
Sending credentials with params - PUT -Firefox
I am logged in on Walmart's website, and I have a shopping cart. When I add items to my cart, I make an PUT request
PUT request picture - https://i.sstatic.net/xRXxD.png
and just like that, I add ...
2
votes
0
answers
338
views
Why can browser extensions use "fetch" without cross-origin permissions?
When XMLHttpRequest is being used to do cross-origin requests, permissions are required via manifest.json, as stated here: https://developer.chrome.com/apps/xhr
But when using fetch, it doesn't need ...
2
votes
1
answer
4k
views
webRequest API: How to get the requestId of a new request?
The chrome.webRequest API has the concept of a request ID (source: Chrome webRequest documention):
Request IDs
Each request is identified by a request ID. This ID is unique within a browser session ...
1
vote
1
answer
221
views
Error when accessing rest service from WebExtension using XMLHttpRequest
I am trying to access a rest service that I am hosting on an amazon AWS server from a firefox WebExtension.
I have registered a background script in the manifest.json which then tries to access the ...
7
votes
1
answer
1k
views
Firefox WebExtension: Make XMLHttpRequest
I'm making a Firefox WebExtension add-on. Here's what should happen:
User clicks browser icon on ANY page.
JavaScript is executed, collecting information from the page.
Information is sent to my ...
1
vote
1
answer
787
views
HTTP requests from WebExtensions options page not working
I'm writing a Firefox browser extension. Some HTTP requests sent from the options tab never return. This hello world works:
var req = new XMLHttpRequest();
req.open("GET", "https://jsonplaceholder....
3
votes
1
answer
3k
views
How to run cross-domain XHR request with correct permissions in a Webextension?
Goal: I want to develope a Firefox Webextension (similar to Chrome extensions), which detects HTML and JavaScript files, before they are loaded. If there is specific content in those files, they will ...