Skip to content

feat: warn about userscript grants#449

Open
AlexTzib wants to merge 1 commit into
Manuito83:developfrom
AlexTzib:userscripts-grant-warning
Open

feat: warn about userscript grants#449
AlexTzib wants to merge 1 commit into
Manuito83:developfrom
AlexTzib:userscripts-grant-warning

Conversation

@AlexTzib
Copy link
Copy Markdown
Contributor

@AlexTzib AlexTzib commented May 6, 2026

Hi @Manuito83, this is the first small follow-up from the older DX/userscript compatibility work in #289.

This PR adds a confirmation step when a userscript declares @grant entries. The app already parses and stores these headers, but currently the user can save/load the script without seeing what permissions the script asked for.

What changed:

  • shows a permissions dialog before saving/loading scripts with non-empty @grant values
  • lists the declared grants so the user can review them
  • treats @grant none as no warning
  • does not change runtime behavior or enforce permissions yet

I kept this intentionally small and separate from the more risky @require/runtime work so it is easier to review. Please let me know if you prefer different wording or a different place for this warning.

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.

1 participant