Skip to content

Instantly share code, notes, and snippets.

@LouCypher
Last active April 15, 2019 16:28
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LouCypher/3193779 to your computer and use it in GitHub Desktop.
Save LouCypher/3193779 to your computer and use it in GitHub Desktop.
Make Greasemonkey userscripts settings syncable with Firefox Sync

What this script does

Makes all Greasemonkey userscripts settings syncable with Firefox Sync.

How to use this script

  1. Launch Scratchpad.
  2. Copy this script and paste it on Scratchpad.
  3. Set the Environtment to Browser on Scratchpad.
  4. Execute.

If Scratchpad doesn't have Environtment menu

  1. Enter about:config?filter=devtools.chrome.enabled on Location Bar and press Enter.
  2. Set devtools.chrome.enabled value to true.

REMEMBER TO BACKUP YOUR PREFERENCES BEFORE RUNNING THIS SCRIPT!
I AM NOT RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS!
💀

Flattr this! Endorse this!

var prefs = Services.prefs;
var prefArray = prefs.getChildList("greasemonkey.scriptvals", {});
for (var i = 0; i < prefArray.length; i++) {
prefs.setBoolPref("services.sync.prefs.sync." + prefArray[i], true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment