如何将本地 Tampermonkey 脚本转换为基于 Web 的脚本以进行同步?

How to I convert a local Tampermonkey script to web-based for purposes of synchronization?

我希望我的 TM 脚本同步并且我阅读了可能的常见问题解答,但是 it gives the caveat:

Tampermonkey can only sync scripts that are installed from a remote source. This source can be any URL that is accessible by both of your Chrome browsers.

好的,很酷,我有一个可以托管它的网络服务器,但问题是我无法弄清楚如何做到这一点。

  1. 将您的脚本保存为 *.user.js 文件。例如:AddUnicornIconsToTwitter.user.js.

  2. 确保您的脚本具有 @version directive。这就是 Tampermonkey 知道何时需要更新脚本的方式。

  3. 将该文件上传到服务器上可通过网络访问的文件夹。例如:
    YOUR_SERVER.COM/myTMscripts/

  4. 要安装,只需使用 Chrome 浏览到该新地址,例如:
    https://YOUR_SERVER.COM/myTMscripts/AddUnicornIconsToTwitter.user.js

  5. 按照 Tampermonkey 提示安装脚本。

  6. 如果更改脚本,请务必增加 @version 数字