diff options
| author | Stephen Blott | 2017-10-28 15:35:39 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2017-10-28 15:35:39 +0100 | 
| commit | 720474858f2f52ad62934b43c346b49165c461ac (patch) | |
| tree | 1a6c782bcdd1ffd5d4b546ca36505315730c2f4e /lib | |
| parent | 534a0f8c471ea96081b30fc2a57d183f6b4268c9 (diff) | |
| download | vimium-720474858f2f52ad62934b43c346b49165c461ac.tar.bz2 | |
Add backup/restore for Vimium options.
See the *very* bottom of the options page (below advanced settings).
Clicking "Backup" creates a JSON file.
Selecting a backup populates the options inputs, the user then clicks *Save Changes* to confirm.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/settings.coffee | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/lib/settings.coffee b/lib/settings.coffee index 11cf7557..fd1ef268 100644 --- a/lib/settings.coffee +++ b/lib/settings.coffee @@ -202,7 +202,7 @@ Settings.init()  # Perform migration from old settings versions, if this is the background page.  if Utils.isBackgroundPage() -  Settings.onLoaded -> +  Settings.applyMigrations = ->      unless Settings.get "settingsVersion"        # This is a new install.  For some settings, we retain a legacy default behaviour for existing users but        # use a non-default behaviour for new users. @@ -218,6 +218,8 @@ if Utils.isBackgroundPage()      # be removed after 1.58 has been out for sufficiently long.      Settings.nuke "copyNonDefaultsToChromeStorage-20150717" +  Settings.onLoaded Settings.applyMigrations.bind Settings +  root = exports ? (window.root ?= {})  root.Settings = Settings  extend window, root unless exports? | 
