Comments (6)
At the moment, Firefox users wouldn't get a prompt for host_permissions
in manifest v3 and instead have to do the following post-install:
- Go to about:addons
- Click on the extension
- Switch to the Permissions tab
- Enable the optional permissions required
from hnrelevant.
Another options is to programmatically request permissions using browser.permissions.request
API from a user action like: browserAction
popup
from hnrelevant.
For some background:
- w3c/webextensions#227
- https://discourse.mozilla.org/t/blog-post-manifest-v3-in-firefox-recap-next-steps/97372/7
For reference see:
- Permissions API: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions/
from hnrelevant.
According to this comment made by Tomislav Jovanovic (back in 26/6/2023)
Yes, we're developing an update to the install flow for MV3, that will enable users to choose which host permissions to grant, and the default will be checked (meaning granted) for extensions which ask for a limited number of hosts (likely up to 6-10).
Either way, we still need to handle the case of rejected permissions
from hnrelevant.
Note
During initial testing, after all permissions are granted and the extension loaded successfully, fetching results failed with an error that look like this:
Content-Security-Policy: The page’s settings blocked the loading of a resource at https://hn.algolia.com/api/v1/search... (“default-src”).
Turns out we're also required to use background.js
for fetch now:
XHR and Fetch
Content scripts can continue using XHR and Fetch by first making requests to background scripts. A background script can then use Fetch to get the data and return the necessary information to the content script. To avoid privacy issues, set the “credentials” option to “omit” and cache option to “no-cache”. In the future, we may offer an API to support the make-request-on-behalf-of-a-document-in-a-tab use case.
from hnrelevant.
Firefox's manifest v3 is ready.
But, due to to host_permissions
being opt-in, which render the extension broken on first install, we'll stick with v2 on the AMO (addons.mozilla.org) listing for now to avoid any friction. Version 0.2.0
still uses manifest v2 but lays the groundwork for a smoother transition in the future by incorporating changes to permissions and using service worker.
from hnrelevant.
Related Issues (16)
- Support different number of results using a dropdown
- Show domain for results if the submission is a URL
- Small screens support HOT 1
- Avoid failure when HN has simple changes in its DOM structure
- Changing the number of results triggers search in manual mode
- Add search type `Verbatim` and `Similar` HOT 1
- Attach timestamp information for the results
- The year appended to the title e.g: (2016) can alone completely wreck the results.
- Safari support HOT 1
- Ability to control search keywords to improve search
- Avoid running on a comment page
- Add a tooltip with hints on how to improve search
- Firefox version HOT 2
- User preferences HOT 1
- Handle special characters in submission title
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hnrelevant.