Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
349 views

Add an unsafe header in a content-script for a single request

In a browser extension I'm creating I need to process an ajax request made in a content-script. Although the url has the same host that the page we're into, it turns out I need to add some unsafe ...
Eric Roy's user avatar
  • 343
0 votes
0 answers
20 views

Writing Firefox extension for a page with AJAX [duplicate]

I'm learning to create Firefox extensions. Now I wrote a simple test extension that changes all images on the page to my image: var images = document.getElementsByTagName('img'); var myimgURL = ...
Alexander Rysev's user avatar
1 vote
0 answers
41 views

JavaScript Ajax request from Firefox browser action popup [duplicate]

I am trying to create an add-on for Mozilla Firefox. I have created a popup for browser action toolbar icon. Now I just want to make an AJAX request on clicking a button in the popup. How can I do ...
Anoop Mayampilly Muraleedharan's user avatar
0 votes
1 answer
3k views

jQuery.ajax() blocked due to CSP within WebExtension

I'm developing a Mozilla Firefox extension, which needs to communicate with my server on localhost:8080. jQuery.ajax({ type: query_method, url: "http://localhost:8080/item", ...
hwding's user avatar
  • 880
0 votes
1 answer
313 views

How to override XMLHttpRequest in Firefox's WebExtension

I am trying to override the XMLHttpRequest.protype.open method in Firefox's WebExtension. I have written a following code in content script var oldOpen = XMLHttpRequest.prototype.open; ...
sam's user avatar
  • 501
3 votes
1 answer
771 views

XMLHttpRequest Status 0 for Firefox 49.0.2 Add On

There is a XMLHttpRequest in the content script of my Firefox WebExtensions add on. Q: why is the status of this request is always 0? This is the JavaScript code making the request: var query = "...
Gladclef's user avatar
  • 709
7 votes
1 answer
5k views

XMLHttpRequest from Firefox WebExtension

I've seen loads of examples of creating xhr requests from Firefox Add-ons, but I am trying to use the new WebExtensions stuff (where require and Components are undefined) and can't seem to see why I ...
tommed's user avatar
  • 1,551