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 @grant for window.external #2309

Open
kkmuffme opened this issue Dec 20, 2024 · 0 comments
Open

Add @grant for window.external #2309

kkmuffme opened this issue Dec 20, 2024 · 0 comments

Comments

@kkmuffme
Copy link

Actual Behavior

Currently, a hardcoded list of URLs have access to window.external.Tampermonkey (#322)

Expected Behavior

It would be useful, if there was a way to @grant to allow access to them from the script on URLs this script runs on.
Possibly, using a custom object key to prevent detection, e.g.
@grant external.myTampermonkey

to be able to access window.external.myTampermonkey (instead of window.external.Tampermonkey)

Why?
It would often be helpful, if the script could open tampermonkey settings e.g.

window.external.Tampermonkey.openOptions( 'nav=dashboard' );

to guide users on set up or questions (since the chrome-extension:// URLs won't work with window.open)

Additionally, in a corporate setting, it's often much faster to check which tampermonkey scripts are installed/their version, than having to wait for someone to update any group policies,...

Specifications

  • TM: 5.3.3
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

No branches or pull requests

1 participant