google-chrometampermonkey

Convert local userscript to web-based for Tampermonkey sync via 'browser sync' method?


I want my TM scripts to sync and I read in the FAQ that is possible via Google Drive, Dropbox, WebDAV, and Browser Sync. For the Browser Sync method it gives the caveat:

Browser Sync If it's available for your browser, then it uses your browser's internal service to transfer information between all Tampermonkey instances. Please note that you have to be signed in to your browser and that the amount of data that can be synced is very limited. That's why Tampermonkey needs a publicly accessible URL to sync your scripts.

Ok, cool, I have a web server I can host it at but the problem becomes that I cannot figure out how one does this.


Solution

    1. Save your script as a *.user.js file. EG: AddUnicornIconsToTwitter.user.js.

    2. Make sure your script has a @version directive. This is how Tampermonkey will know when a script needs to be updated.

    3. Upload that file to a web-accessible folder on your sever. EG:
      YOUR_SERVER.COM/myTMscripts/

    4. To install, merely browse to that new address using Chrome, EG:
      https://YOUR_SERVER.COM/myTMscripts/AddUnicornIconsToTwitter.user.js

    5. Follow the Tampermonkey prompts to install the script.

    6. If you change the script, be sure to increment the @version number