webextension | Alpheios Browser Extensions
kandi X-RAY | webextension Summary
kandi X-RAY | webextension Summary
This repository contains the wrapper code for the Alpheios Reading Tools Browser extensions for Chrome, Firefox and Safari. The core functionality is provided by the alpheios-components library. The webextension wrapper code provides the implementation of the WebExtensions API (Chrome/FF) and App Extension API (Safari).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of webextension
webextension Key Features
webextension Examples and Code Snippets
Community Discussions
Trending Discussions on webextension
QUESTION
I created a temporary Firefox add-on which opens a new tab when an icon is clicked. I used the example provided in this link:
https://github.com/mdn/webextensions-examples/tree/master/open-my-page-button
This works fine but the new tab opens to a fixed URL. So added a preferences page using the code provided in this link:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Implement_a_settings_page
Now I'm able to save a URL in the preference page of the extension and the saved URL can be verified in the Extension Storage, here is an image showing it:
...ANSWER
Answered 2021-May-31 at 07:30Since you have the onGot(item)
function working. You should give your preference_url
a name to be traced from.
As you can see, when you inspect the [ Extension Storage ]. The preference_url
is stored in a key named as type.
So, you should give it a name like preferred_URL
or other name for easy tracking.
QUESTION
Well guys, I have this script that adds the product to the cart, but I need it to work as quickly as possible, currently it’s working for about 19 seconds if you run this code, of course there are a number of factors that should be taken into account consideration, one of them is the response time of the website and everything ... Well, I took almost all the resources on this site to load faster
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/ResourceType
But I did not remove the script loading (javascript), but I want to remove all the javascript from the page except what is embedded in the html, that is, I want to prevent all references to javascript files except the javascript that is inserted in the html, and I would like to know if it is possible to disable html text loading, this is my code:
...ANSWER
Answered 2021-May-28 at 05:05I was able to block all files with the extension .js after taking a deep look at Google, I used this code:
QUESTION
Is it possible for a WebExtension to override the IP address of a server, or to modify/intercept DNS requests or override the DNS cache? I'm trying to code a WebExtension that provides browsers with the same functionality as cURL's --resolve
.
Specifically, to:
- connect to a different IP than that listed in DNS
- add entries for particular
NXDOMAIN
that the user wishes to resolve as if it existed - "resolve" particular entries offline
- cache or pin DNS entries in a software-defined way in preparation for a known upcoming DNS poisoning attack
In short: to simulate the effect of a hosts
file, but without administrative privileges / messing with the rest of the system.
ANSWER
Answered 2021-May-19 at 21:03Yes, but (for now) not trivially.
WebExtensions cannot rewrite these responses directly, but they can use the browser.proxy.onRequest
API with ProxyInfo.proxyDNS
to redirect DNS requests for affected domains through a SOCKS4 or SOCKS5 proxy which mangles the responses.
You will, however, need a Native Host component (or a VPS, etc.) to actually run this proxy -- at least until Firefox adds support for WebExtension-run sockets (or provides a built-in non-socket-based proxying API).
QUESTION
I need a Chrome extension to run on every domain except for one. It runs everywhere with this:
...ANSWER
Answered 2021-May-14 at 10:17To run everywhere except "google" domains use exclude_globs
. In manifest.json
:
QUESTION
My problem is that i can't get my textfields with document.getContent()
and document.getContents()
.
So I tried to use XPath for selecting the objects, it works but i can't copy the object and add it again.
For example:
XPath Exception Comment //wps:txbx/w:txbxContent javax.xml.bind.MarshalException SAXException2, Missing @XmlRootElement-Annotation //wps:txbx/w:txbxContent/w:p/w:r javax.xml.transform.TransformerException unexpected Element, because it is on the wrong placeI also tried to make a own object but this also don't worked for me, because it wasn't accepted as an JAXB Object.
This is my code:
...ANSWER
Answered 2021-May-03 at 07:12Probably a namespace issue... The txbx element is in xmlns:v="urn:schemas-microsoft-com:vml" So maybe just change it to: (I don't know how you declare namespaces in docx4j)
QUESTION
I'm trying to encrypt something in a webextension with SubtleCrypto and decrypt it in flutter with cryptography. I want to use a password to encrypt a message, send it to a app and decrypt it with the same password. For this I use AES GCM with pbkdf2
I was able to find an encryption snippet on the Mozilla documentation page. However, I struggle decrypting it in flutter.
I'm also having problems with terminology. SubtleCrypto uses iv, salt and tags while flutter cryptography uses nonce and mac.
Javascript code:
...ANSWER
Answered 2021-Apr-05 at 15:05The following issues exist in the Dart code:
- The WebCryptoAPI code concatenates the GCM tag with the ciphertext in the order ciphertext | tag. In the Dart code, both parts have to be separated accordingly.
Also, in the Dart code, the nonce/IV is not taken into account. A possible fix ofdecrypt()
is:
QUESTION
I like to use the windows.WindowState API, but got the error "windows is not defined".
...ANSWER
Answered 2021-Jan-30 at 17:47The windows
API can only be used in extensions, and if you are using an extension, you need to request permission in your extension's manifest.json
file.
Then you would just use it like this:
QUESTION
I am able to get the chains well if I use browser.webRequest.getSecurityInfo inside a browser.webRequest.onHeadersReceived listener during a regular https connection, but if the connection failed due to a security issue such as an expired certificate then onHeadersReceived
never gets triggered.
If I accept the bad certificate then onHeadersReceived
does get triggered, but the security info does not contain the bad certificate.
I tried looking at browser.webRequest.onErrorOccurred and browser.webRequest.onCompleted but had no luck in getting getSecurityInfo
to work in those contexts
I know the browser itself has this information because you can get it to display the certificate chain in the built in viewer (which can display arbitrary certificates in the format of url_encode(base64_encode(DER_certificate)
)
Does any one know how can I get either nice certificate objects or at least the DER bytes (encoded or not, it doesn't matter) ?
...ANSWER
Answered 2021-Mar-23 at 11:22If I accept the bad certificate then onHeadersReceived does get triggered, but the security info does not contain the bad certificate.
This is a bug in Firefox.
I tried looking at browser.webRequest.onErrorOccurred and browser.webRequest.onCompleted but had no luck in getting getSecurityInfo to work in those contexts
Like the documentation says: getSecurityInfo
only works in onHeadersReceived
. There are two related bugs, 1499592 and 1474657, to make getSecurityInfo work with other listeners as well.
QUESTION
New to web extension development & I'm trying this example. However when I run this extension it does not trigger the listener.
This is the manifest file.
...ANSWER
Answered 2021-Mar-01 at 08:49Quoting MDN:
To intercept resources loaded by a page (such as images, scripts, or stylesheets), the extension must have the host permission for the resource as well as for the main page requesting the resource.
So, you also need to add 127.0.0.1
in manifest.json because it's not the same as localhost
, which can actually point to a different IP.
QUESTION
I have a web site made by Python Django.
And I want to check if a visitor's chrome browser's chrome extension is installed.
I found some information, it looks possible with Javascript.
https://www.python2.net/questions-993829.htm
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/management/getAll
They say you can get all installed chrome extensions by writing it like this.
chrome.management.getAll() or brower.management.getAll()
But When I tried that "chrome.management" is not defined.
Is it need to add library to use chrome.management?
I read the API documents, But I didn't know How can I to do.
Please teach me if you know about this. Thank you.
...ANSWER
Answered 2021-Feb-26 at 06:02From the looks of chromes docs (https://developer.chrome.com/docs/extensions/reference/management/), it seems that chrome.management
is only able to be used in chrome extensions with the management
permission. There doesn't seem to be any real alternative for websites. (Although if you own the extension you might be able to create a hidden div with a specific id, then the website could detect that).
If chrome did allow websites to see this it would also make fingerprinting much easier.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webextension
GitHub Actions will execute the release.yml workflow to inject the build number, install the qa branch of alpheios-components, build the distribution files, and tag a pre-release in GitHub, with the dist files packaged as a release artifact.
In the Safari build environment, pull the qa branch and extract the dist.zip from the Pre-release in GitHub to the local dist directory.
Create the Safari Package as described in BUILD-SAFARI.md
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page