Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
aceynk's user avatar
  • 11
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>"], ...
Hassaan's user avatar
  • 318
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 ...
Carlos Martínez's user avatar
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 ...
wothke's user avatar
  • 127
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 ...
Rycec's user avatar
  • 31
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 ...
Vladimir Kolenov's user avatar
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) ...
mahdia's user avatar
  • 53
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 ...
Vlada's user avatar
  • 145
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 ...
timche's user avatar
  • 131
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 ...
Philipp Claßen's user avatar
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 ...
Urs Beeli's user avatar
  • 805
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 ...
user984003's user avatar
  • 29.5k
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....
kal's user avatar
  • 170
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 ...
Zeussi's user avatar
  • 581