-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Feature Request] Syncing #174
Comments
Note that there are incompatibilities in this API between the different userscript managers. Specifically, Greasemonkey 4 is significantly different. This can be worked around by using a shim. However, that userscript storage would be completely unavailable to the browser extension version(s) of this script. Thus, those versions would need to be accommodated in some manner. While something could be done to allow the browser extension version to store data in extension storage, if userscript storage and extension storage were used exclusively, there would be no way to share comment data between the userscript version and browser script versions. Currently, with using |
For tampermonkey, In @shog repo (SOX) he used |
So, what you're really asking for is that you want to sync to different Chrome browsers on different devices when using Tampermonkey (or maybe? all browsers the user runs Tampermonkey on with "Script Sync" enabled). There's nothing inherent that prevents using userscript storage, other than the issue that people will no longer be able to share data between the browser extension versions of this script and the userscript versions. You'll probably need to get buy-in that loosing that feature is acceptable. It's unclear how important people consider that to be, but it's definitely something I've used, once. Alternately, you could create some method of sharing data, but it wouldn't be automatic. Keep in mind: You will need to write the code to transition everyone from using You'll need to develop a method to keep comments both separate by domain and ones that are shared across all domains, or even permit the user to select which domains each comment is shared with (although this last could be cumbersome with 340+domains (approx 170 SE sites + a meta site for each) for each comment). Remember that the script targets use in any userscript manager, not just Tampermonkey, and as a browser extension, so any use of the userscript API must both be compatible across all userscript managers and have a shim that allows use as a browser extension. Note: All of the above isn't all that difficult. I've considered doing it from time to time over the last few years, because it would enable a feature I'd like to see: having at least some comments that are global across all Stack Exchange sites, rather than having the list be completely separate per site (i.e. there are identical comments I make on multiple sites, which I'd like to not have to specifically copy from one site to another when I change). |
Mostly people have single userscript extension & single version of a script. |
That's sort-of true. The auto-update/check feature actually results in it being common that people, unknowingly, run more than one version of the script, because the current version of the script is downloaded and run for every load of a page on which the script runs, regardless of if the user has updated their installed version. This is a separate issue. The feature currently exists that someone could switch between the userscript and the browser extension version of the script without loosing data, due to the comment data being stored in |
If they switch , we could export & import |
Obviously, there are options. I haven't said it's a deal-breaker, just A) that it's a feature that exists now; B) that we don't know how much it is used; and C) that it's something that needs to be considered by more than just the person writing the code, if it's a feature that will be eliminated. |
Use GM_setValue instead localStorage to sync between browsers
The text was updated successfully, but these errors were encountered: