Skip to content

Production publisher rejects standard GM.* grants such as GM.addStyle #2102

Description

@Makaytron

Production behavior

OpenUserJS username: makaytron
Date: 2026-08-04

Publishing a current userscript through New Script -> Write Script Online -> Submit Code returns HTTP 400:

`@grant` with value of `GM.addStyle` is not valid or supported.

Public source used for the reproduction:
https://raw.githubusercontent.com/Makaytron/Etsy-Automation-Tools/main/scripts/etsy-message-assistant/Makaytron-Etsy-Message-Assistant.user.js

A separate source using @grant GM_info was also rejected. I understand the rationale in #2101 that GM_info should not need an explicit grant, but removing that one line does not resolve the broader problem: the production validator also rejects standard modern GM.* grant names such as GM.addStyle.

Expected behavior

Modern GM.* functions should be accepted in @grant. Tampermonkey's current documentation explicitly says @grant whitelists both GM_* and GM.* functions:
https://www.tampermonkey.net/documentation.php?locale=en&q=grant

Violentmonkey also documents GM.addStyle as a supported Greasemonkey 4-compatible alias:
https://violentmonkey.github.io/api/gm/#gm-addstyle

Impact

The exact public scripts are live on GitHub and Greasy Fork, but cannot be published on OpenUserJS without changing functional metadata or maintaining an OpenUserJS-specific fork. GitHub repository:
https://github.com/Makaytron/Etsy-Automation-Tools

Could the production metadata validator accept documented GM.* grant names, or provide the supported compatibility mapping?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions