问题
I wish to have access to my Greasemonkey scripts across all machines I use. I already enabled the 'Enable Firefox Sync for User Scripts' setting on Greasemonkey's settings dialog, but then I read that it only syncs externally hosted scripts.
Then I attempted to set up synching with the following method:
- I moved Greasemonkey's 'gm_scripts' folder (located in
%appdata%\Mozilla\Firefox\Profiles\<profile name>
) to a OneDrive folder. - I created a symlink in the original place pointing to the OneDrive folder mentioned above:
mklink /D gm_scripts "%userprofile%\SkyDrive\App Profile Synching\GreaseMonkey\gm_scripts"
- I set up the same symlink on another machine, and checked that the symlink works.
As a result, my scripts continue to show up fine in the original machine. But they don't show up at all on the second machine. This seems to indicate that Greasemonkey have some script list in another location.
How can I solve this issue, or what other methods are available to implement the syncing of my own Greasemonkey scripts across multiple machines?
回答1:
Just to follow up: The original method presented in the question ended up working perfectly fine, after explicitly setting up the 'gm_scripts' folder as 'available offline'. I am now using this method for approximately a month, and the edited scripts are syncing quickly, without any hiccups, between two machines.
So, my initial suspicion of Greasemonkey storing some configuration data in another place proved to be false (or it is irrelevant for the purpose of syncing).
Consequently: If anyone is looking for a syncing method of their own, locally hosted userscripts (which, AFAIK, are not supported in Greasemonkey's Firefox profile syncing feature):
- Moving the 'gm_scripts' folder to a cloud storage folder, and setting up symlinks in the original place is a working solution.
Important: The only scenario tested and found working in this Q/A is when the 'gm_scripts' folder only contains locally stored userscripts, and Greasemonkey's Firefox profile syncing feature is turned off. I have not tested what happens if the 'gm_scripts' folder contains both locally stored userscripts and copies of externally hosted userscripts.
来源:https://stackoverflow.com/questions/28560090/how-to-sync-locally-hosted-greasemonkey-scripts-across-multiple-machines