I prefer option 1 and 2.2: 1. Give support for old API makes better compatibility, both to old scripts and *scripts for other userscript host *(this is important). 2. A series of new API's would be better if they work on new environment much better.
But for the first version, new API's is not what *must have*. So, just make it compatibility to old ones in the 4.0 version should be reasonable. For making it compatibility, performance and some rare usecase may be ignored if it is too complex. And userscript may have a special tag in header to tell the userscript host (e.g. GM 4.0) that it do not need old APIs if newer ones is available. BTW, I hope the newer ones would be designed as an object contain these functions but not global variables. ( GM.getValue instead of GM_getValue ). Although TM is not open source, but maybe you can have a look at Violent Monkey, which works on Chrome and is open source (MIT). ( github.com/violentmonkey/violentmonkey ) 在 2017年5月13日星期六 UTC+8上午2:44:08,Anthony Lieuallen写道: > > Greasemonkey is over ten years old, as are most of its special APIs for > user scripts. They're all (save GM_xmlhttpRequest) synchronous calls, > which made sense at the time. > > In Firefox 57 legacy extensions are gone, only WebExtensions remain. > Webext is different in several ways, including parent (chrome) and child > (content) process separation, communication/coordination via message > passing, and concentration on asynchronous APIs. As I understand it, > there's no way to "block" on an async backing API. > > This leaves several paths forward for Greasemonkey, in no particular order: > > 1. Do our best to emulate the old APIs, with possibly slow, buggy, > inefficient, or inferior functionality. > 2. Add new similar APIs, but with asynchronous interfaces. > 1. With the same names as old APIs. > 2. With new names/organization. > 3. Give up on supporting special APIs. > 4. Give up completely, don't even port Greasemonkey to webext. > > I've got my own opinions here, but before I voice them I'd like to hear > from the community. What would you (script authors especially) like to see > happen? Do you have other ideas I haven't listed? > -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/greasemonkey-users. For more options, visit https://groups.google.com/d/optout.
