I'm trying to port a Chrome/Firefox extension for Safari. But the extension use a lot a feature of those browsers that doesn't seem to exist in Safari : chrome.webRequest (https://developer.chrome.com/extensions/webRequest).
The chrome.webRequest let you get information about every http requests sent (event from others tabs.).
I know that Safari has a very basic safari.application.addEventListener for navigate and beforeNavigatebut Chrome give a lot more information (like responseHeaders) and other events (like onBeforeRedirect or onErrorOccurred).
Is there a way to achieve that with pure js or with the safari js-extension API ?
Related
I'm developing a Firefox add-on which does block the malicious URLs. The problem is that sometimes Firefox render its own deceptive warning page and sometime it allows the extension to render its own warning page.
How can I bypass the deceptive page warning programmatically?
The above behaviour is working fine on Chrome.
Abdul Basit.
The easy way is with the privacy WebExtension API, here the documentation on the Mozilla Developer Network (MDN):
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/privacy
Access and modify various privacy-related browser settings. To use the
privacy API, you must have the "privacy" API permission.
You can already use services.safeBrowsingEnabled for Chrome, Opera, Edge, but Firefox not yet.
You can play around with the request status code 400, because it is related to the deceptive request routing.
Good luck.
I'd like to create chrome extension which behaves like a proxy, so I can do whatever I want with HTTP requrests coming from browser. What approach can I use for this? What API to use for HTTP request hooking? Googling and reading chrome documentation didn't give me any ideas.
Thanx.
I need your help.
I'm developing an IE extension and it must get information about every outcome HTTP request done from the IE. Is it possible?
For example, in Chrome it can be achieved with chrome.webRequest, in Firefox - with httpObserver, but I have not found a way to do it in IE extension.
Is it possible?
Thanks!
I think what you are looking for is
HttpListener
There is more to read about it on MSDN:
https://msdn.microsoft.com/en-us/library/system.net.httplistener(v=vs.110).aspx
I have implemented a user-to-user audio call system using this guide:
http://wern-ancheta.com/blog/2015/05/03/implementing-audio-calls-with-peerjs/
It is now completed and works perfectly on my site when using Google Chrome.
However when I try to connect to a user on IE 8 I receive the error:
Your browser does not support the audio element.
In Mozilla that call initiates, but does not connect.
One of the reasons I wanted to use peerjs is because I thought it would be cross-browser (and device) compatible.
Has anyone encountered this issue and have a clue as to why it is happening?
Thanks
The implementation of the web audio api in Mozilla is buggy as well. You should be very careful using web audio api with mozilla.
Team,
I am working on Angular JS application. When I want to test the app, I used to just launch the application directly into the browser from file system. The url would be like
file:///Users/easwar/AngularApp/index.html
When I need to launch the app in Chrome, I need to open the browser from terminal using the below command
open -a Google\ Chrome --args --disable-web-security -–allow-file-access-from-files
to avoid the below error.
"XMLHttpRequest cannot load , Cross origin requests are
only supported for protocol schemes: http, data, chrome,
chrome-extension, https, chrome-extension-resource."
But surprisingly in Safari the app works fine without doing anything like this.
I would like to find what is the difference between these browser behaviors? Why its working in Safari and its not working in Chrome without a tweak?
In short: google chrome doesn't like local cross calls.
More found here: Cross origin requests are only supported for HTTP but it's not cross-domain .
It's Googles privacy and security policy: they try to avoid as much risks as possible, and local file calling seems to be one of them.
Read more on cross origin requests and how they're handled in Google Chrome here: https://developer.chrome.com/extensions/xhr
If you don't want to use those console commands, you might want to look for a webserver to host it (or a local webserver).