Enable userScripts API by default
Categories
(WebExtensions :: General, task, P2)
Tracking
(firefox136 fixed)
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [addons-jira])
Attachments
(1 file)
The implementation of the userScripts API has been available behind a flag for a few releases now. The API is ready, and the most significant blocker (opt-in UX as described in bug 1917000) has been resolved, with the desktop implementation landed in 135 (bug 1931548), and passed QA.
This bug tracks enabling the feature by default on desktop.
Mobile may follow later, since the mobile UI is still in progress (bug 1931554 & bug 1931556).
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 3•1 year ago
|
||
Documentation tasks:
Update old documentation to emphasize their irrelevance:
- user_scripts manifest key: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/user_scripts
- Replace overview with pointers to new API: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/userScripts
userScripts.register()(confusingly - same name as the new API). The old page may need to be relocated to a new place: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/userScripts/register- https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/userScripts/Working_with_userScripts
New content:
- API definitions at https://searchfox.org/mozilla-central/source/toolkit/components/extensions/schemas/user_scripts.json
- Code sample with demo and documentation nearly ready to merge at https://github.com/mdn/webextensions-examples/pull/576
- browser-compat-data with Firefox and Chrome support data. Chrome docs: https://developer.chrome.com/docs/extensions/reference/api/userScripts
- Mention in Firefox 136 for devs: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/136
- "userScripts" is an example of an optional-only permission, in Firefox (not Chrome) - https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions#optional-only_permissions
- Descriptions and mock-ups of how the opt-in UI may look like: https://bugzilla.mozilla.org/show_bug.cgi?id=1917000
- (strongly encourage loading the example from https://github.com/mdn/webextensions-examples/pull/576 to generate new screenshots of actual browser UI!)
Non-MDN content updates:
- Add userScripts and permission warning to https://extensionworkshop.com/documentation/develop/request-the-right-permissions/
- (I will handle this separately) add the new permission warning and description to user documentation at https://support.mozilla.org/en-US/kb/permission-request-messages-firefox-extensions
Comment 4•1 year ago
|
||
| bugherder | ||
Are we happy that the documentation is now complete?
- (MDN) Bug 1943050 user scripts API - move legacy content #37975
- (MDN) Bug 1943050 - new userScripts API content #38073
- (BCD) Data for legacy version of webextension.api.userScripts #25857
- (BCD) Bug 1943050 new webExtension.api.userScripts #25913
- (EW) Bug-1943050 userScripts API permissions content #2013
| Assignee | ||
Comment 6•1 year ago
|
||
Yep, documentation completed. For future reference, other than comment 5, the rest of the relevant userScripts documentation changes are:
- https://github.com/mdn/webextensions-examples/pull/576 "Add example using MV3 userScripts API" #576
- minor fixups: https://github.com/mdn/webextensions-examples/pull/579 and https://github.com/mdn/content/pull/38348
The BCD data for mobile is handled at bug 1949955
There is also a pending SUMO update request at bug 1946616.
Description
•