userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

Synchronous GM_* value API

Open quoid opened this issue 4 years ago • 3 comments

Explore implementing synchronous api methods:

GM_getValue, GM_setValue and GM_listValues

quoid avatar Dec 24 '21 00:12 quoid

relevant: https://github.com/quoid/userscripts/issues/167#issuecomment-975380666

quoid avatar Dec 24 '21 00:12 quoid

I'm assuming that implementing a synchronous method can only be achieved by caching that data in the js layer.

But I wonder, do we really need to implement these synchronized methods? These were deprecated five years ago when Greasemonkey 4.0 was rewritten based on WebExtensions.

ACTCD avatar Nov 02 '22 09:11 ACTCD

I think the biggest gain we get out of this is backwards compatibility with old userscripts that haven't been updated in a while. Authors should probably be using GM. or at the very least checking for GM_/GM. before committing to their usage.

I feel like this issue is a lot of work, for maybe little gain. I think this has lower priority than other tasks, at the moment.

quoid avatar Nov 02 '22 12:11 quoid