Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example using MV3 userScripts API #576

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rob--W
Copy link
Member

@Rob--W Rob--W commented Dec 18, 2024

Description

Add example using MV3 userScripts API. And many other aspects of MV3 development, useful for #496.

Motivation

This example is part of the documentation of the userScripts API.

Additional details

Related issues and pull requests

@Rob--W Rob--W requested a review from dotproto December 18, 2024 14:53
"browser_specific_settings": {
"gecko": {
"id": "user-script-manager-example@mozilla.org",
"strict_min_version": "134.0a1"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I put strict_min_version 134 because this is the first version of Firefox where the API landed, behind the extensions.userScripts.mv3.enabled preference. I may update it to 135 or 136 once we ship it by default on release.

@erosman
Copy link

erosman commented Dec 18, 2024

Note: "host_permissions" should include "file:///*", as many users (myself included) run personal userScripts on local files.

@Rob--W
Copy link
Member Author

Rob--W commented Dec 18, 2024

Note: "host_permissions" should include "file:///*", as many users (myself included) run personal userScripts on local files.

This is a demo extension, not a full-fledged user script manager. For it to be a complete user script manager, it would have to define the full GM.* / GM_* APIs, and also have a better UI. That goes beyond demonstrating the extension APIs and is left as an exercise to the reader.

@erosman
Copy link

erosman commented Dec 18, 2024

I understand.. the intension was to demonstrate that the MV3 userScripts API supports "file:///*" as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants