如何在多台机器上同步本地托管的Greasemonkey脚本? [英] How to sync locally hosted Greasemonkey scripts across multiple machines?

查看:198
本文介绍了如何在多台机器上同步本地托管的Greasemonkey脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望可以在我使用的所有机器上使用我的Greasemonkey脚本。我已经在Greasemonkey的设置对话框中启用了 启用用户脚本的Firefox同步 '设置,但后来我发现它只会同步外部托管的脚本 。

然后我尝试使用以下方法设置同步:
$ b $ ol <

  • 我移动了Greasemonkey的 gm_scripts 文件夹(位于%appdata%\Mozilla\Firefox\Profiles\< profile name> / code>)到一个OneDrive文件夹。
  • 我在指向上面提到的OneDrive文件夹的原始位置创建了一个符号链接: mklink / D gm_scripts %userprofile%\SkyDrive\App Profile Synching\GreaseMonkey\gm_scripts

  • 我在另一台机器上设置了相同的符号链接,符号链接的作品。

    因此,我的脚本在原始机器中继续显示正常。 但是它们在第二台机器上完全不显示。这似乎表明Greasemonkey在另一个位置有一些脚本列表。



    我怎样才能解决这个问题,或者有什么其他的方法可以实现我自己的Greasemonkey脚本在多台机器上的同步?

    解决方案

    后续工作:在明确地将'gm_scripts'文件夹设置为'可离线使用'后,问题中提出的原始方法结束了工作。我现在正在使用这种方法大约一个月,编辑的脚本在两台机器之间快速同步,没有任何打嗝。

    因此,我最初怀疑Greasemonkey存储在另一个地方的一些配置数据被证明是错误的(或者与同步的目的无关)。

    因此:如果有人正在寻找同步方法(其中,AFAIK在Greasemonkey的Firefox个人资料同步功能中不受支持):



    • 将gm_scripts文件夹移动到云存储文件夹,并在原始位置设置符号链接是一个可行的解决方案。

    • $ b

      重要提示:本次Q / A测试和发现的唯一情况是,'gm_scripts'文件夹仅包含本地存储的用户脚本,Greasemonkey的Firefox配置文件同步功能已关闭。如果'gm_scripts'文件夹包含本地存储的用户脚本和外部托管的用户脚本的副本,我还没有测试过会发生什么。


      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:

      1. I moved Greasemonkey's 'gm_scripts' folder (located in %appdata%\Mozilla\Firefox\Profiles\<profile name>) to a OneDrive folder.
      2. 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"
      3. 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?

      解决方案

      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.

      这篇关于如何在多台机器上同步本地托管的Greasemonkey脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆