I would like to use ModHeader chrome extension in order to send headers into my custom chrome extension - is it possible?
Thank you in advance for any help!
Related
I'm working on Chrome extension, that need to work with another extension (Metamask).
Standard way of doing this is by window.ethereum object, but from content script this object is undefined.
I found Can the window object be modified from a Chrome extension? but all examples are blocked by CSP of website (in my case twitter.com)
Is there any way of bypassing CSP from chrome extension's context?
I have just read through the specification of the new declarativeNetRequest API of the Chrome webextension API, which replaces the WebRequest API in the future. I tried to figure out, if I will be able to do the same with declarativeNetRequest, what I currently do with WebRequest. Unfortunately, I think there won't be a replacement, but perhaps I'm wrong and someone can correct me. Here are the two usecases:
In WebRequest.onBeforeRequest: redirect to the URL of my extension and pass the requested URL as parameter. Filtered are local files with "file://" scheme.
In WebRequest.onHeadersReceived: analyze the received headers and redirect depending on header values to the URL of my extension and pass requested URL as parameter. Filtered are <all_urls>.
Thanks for any hints.
When you're writing the manifest.json file, you have to specify matches for your content scripts. The http and https work fine, but if I try to include chrome://*/* or any variant of it, I get an error that I'm attempting to use an invalid scheme for my matches.
Is it not allowed?
By default you cannot run on a chrome:// url page.
However, there is an option in chrome://flags/#extensions-on-chrome-urls:
Extensions on chrome:// URLs (Mac, Windows, Linux, Chrome OS, Android)
Enables running extensions on chrome:// URLs, where extensions explicitly request this permission.
You still have to specify pages that your extension can run on and wildcards are not accepted - so you have to specify the full URL eg chrome://extensions/
The authorized schemes for matches are http, https, file, ftp.
Therefore, chrome is not a valid scheme.
Yes, it is not allowed. You can't link to them from hrefs on a webpage either.
Is there a way to give permission to change the User-Agent header with a chrome extension using XMLHttpRequest?
I tried to use webRequest.onBeforeSendHeaders, but it doesn't trigger for XMLHttpRequests, which is also mentioned here
Chrome extension: webRequest.onBeforeSendHeaders behaves strange
Sorry if this question was duplicated somewhere else, I'm unable to find any solution though.
Is there anyway to change google chrome homepage url by an extension.
I'm trying to write a simple extension which can change homepage url.
Hope you can help me.
It is possible, and a quick search reveals that such an extension already exists.
If you want to do it yourself, you can have a look at the Override Pages documentation. You can change the New Tab page, and therefore can simply implement an HTTP redirect in Javascript to the page you want.
Insert this code to manifest.json:
"chrome_settings_overrides": {
"homepage": "http://www.homepage.com"
}