 re_clipboard = require('sdk/clipboard')
 
 set_interval = require("sdk/timers").setInterval
+
+#
+# Handler for disable/shutdown
+#
+
+exports.onUnload = (reason) ->
+  if reason in ['disable', 'shutdown']
+    if not Storage.get_setting 'save'
+      Storage.set_setting 'password', ''
 
 #
 #

      return
    Storage._s.settings[key] = value

  get_settings: () ->
    Storage._s.settings

  store_disabled_sites: () ->
    Storage._s.ds_list = Storage._s.disabled_sites.get_list()

  handle_boot: () ->
    if not Storage._s.settings
      Storage._s.settings =
        'hidden': true
        'save': true
        'mode': 'sha1'
        'length': '12'
        'content': '[site.url][uname][pass]'
