-
Notifications
You must be signed in to change notification settings - Fork 39
Adds @grant to model for userscripts #317
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
base: develop
Are you sure you want to change the base?
Adds @grant to model for userscripts #317
Conversation
TravisTheTechie
commented
May 24, 2025
- Implements GM.getValue / GM.setValue and that's it so far.
- Needs some work, but I think from some basic testing seems to be working alright.
- Access is scoped to each script.
f51219f
to
8298e76
Compare
* Implements GM.getValue / GM.setValue and that's it so far. * Needs some work, but I think from some basic testing seems to be working alright. * Access is scoped to each script.
8298e76
to
b00318a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending cleanup and a couple comments, LGTM. Haven't tested on device/emulator yet, will do so once cleaned
|
||
return manifestMap.keys | ||
.where((String key) => key.startsWith('assets/userscripts/apis/')) | ||
.where((String key) => key.endsWith('.js')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly a stupid question - why not just .where((String key) => key.startsWith("...") && key.endsWith("..."))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, just my habit of breaking things up like this. I like to think about it this way, though I guess technically it is less efficient (depending on the implementation) because you need to iterate twice. Happy to change it.
* Includes a test script now for the API surface; checked it passes in other script hosts * Figured out how to avoid leaking Future/async all the way the stack