code: function _togglePref(key, value) {
          var val,
              oldPref = !!prefs.get(key);
  
          if (value === undefined) {
              val = !oldPref;
          } else {
              val = !!value;
          }
  
          // update menu
          if (val !== oldPref) {
              prefs.set(key, val);
          }
  
          return val;
      }
docs: Toggles or sets the preference *