Changes to `@grant` and `@inject-into` · Issue #265 · quoid/userscripts · GitHub
Skip to content

Changes to @grant and @inject-into #265

Description

@quoid

The next patch update will change a few things, that while programmatically minor (from a development standpoint), that can change the way your userscripts work. Since I don't have discussions enabled on this repo, this issue is more of a public announcement, but comments and discussion are more than welcome. Here are the changes:

  • content is the new default value for the @inject-into metadata key (i.e. if you don't include @inject-into the value, content, will be assumed)
  • when @grant has any value, @inject-into values of page and @inject-into values of auto will automatically be reverted to @inject-into content (a message will be printed to the browser console when this occurs)
  • users can still inject into the page context, however they can not use GM apis in the page context

The reason these changes are being implemented is to ensure the the page context can not gain access to the privileged GM apis.

Related issue discussion: #252

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions