userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

Implement getResourceURL, getResourceText, `@resource`

Open quoid opened this issue 4 years ago • 14 comments

quoid avatar Feb 02 '22 00:02 quoid

Here's another userscript that has a dependency on GM_getResourceText: Feedly Filtering and Sorting

It might be helpful in validating your implementation, whenever you get around to it.

More info at author's github page

Thanks for a very nice Safari extension!

stevehartwell avatar Mar 14 '22 07:03 stevehartwell

I was looking for this exactly. I have many scripts that rely on something like this:

// @grant GM_getResourceText
// @resource bla https://blabla

In addition, in contrast to tampermonkey and other script managers, it would be cool if the default cache behaviour is no-cache.

Thank you!

onatbas avatar Mar 21 '22 19:03 onatbas

@onatbas this will be in the next api update which should happen soonish

In addition, in contrast to tampermonkey and other script managers, it would be cool if the default cache behaviour is no-cache.

Can you elaborate on this?

The current plan is to implement this in a way that is similar to Greasemonkey and Violentmonkey.

This will probably function in a similar way as @require. That means the resource is download once on save. If the value changes for the key the resource will be re-downloaded. Resources are saved on the filesystem within the app's Data folder. They are not checked for updates.

I should also note, the exact way this would be implemented is not fully realized, so I am open to suggestions.

quoid avatar Mar 22 '22 00:03 quoid

In Tampermonkey settings, under the "Externals" section, it'll let you choose the update interval for the external resources. You can set it to "Always," which means downloading a fresh copy of external resources every time, without needing any change in the key whatsoever. By default, this setting is set to "Every Day" in Tampermonkey, but I use it in "Always" mode to get a fresh copy.

onatbas avatar Mar 22 '22 02:03 onatbas

HI, more or less, when getResourceURL and getResourceText will be implemented?

michael1900 avatar Oct 15 '22 02:10 michael1900

@michael1900 any time estimate I give would be arbitrary, all I can say is that it is not in active development by any of the contributors that I am aware of. I do not think it should be done before #331 as I believe this API would rely on the manifest

quoid avatar Oct 16 '22 02:10 quoid

Hi Dev. Any news about this for ios? Thanks

michael1900 avatar Nov 16 '22 10:11 michael1900

When will getResourceURL and getResourceText implemented? This issue can be closed? Why all this time? :( @quoid It's almost 1 year... bah

michael1900 avatar Nov 29 '22 14:11 michael1900

@michael1900

I can not tell when this will get worked on.

Please remember, this is an open source project. We work on it in our spare time. Anyone (including you) are welcome to contribute, especially if you feel the passionately about a feature.

quoid avatar Nov 30 '22 01:11 quoid

More than a year has passed... :(

michael1900 avatar Feb 20 '23 17:02 michael1900

For those who are looking forward to this API, this will be implemented after #451 is completed, thanks for your patience.

ACTCD avatar Mar 20 '23 05:03 ACTCD

LOL still opened! Shame.

michael1900 avatar Sep 13 '23 15:09 michael1900

Feel free to make a pull request @michael1900

quoid avatar Sep 13 '23 15:09 quoid

It looks like Greasemonkey haven't implement getResourceText in the new async APIs.

So if we're not going to implement the old Synchronous APIs #189, we'll probably just implement GM.getResourceUrl.

ACTCD avatar Oct 10 '23 21:10 ACTCD

Year 2024 and still nothing... 🤦

michael1900 avatar Jan 24 '24 22:01 michael1900