Skip to content

Commit

Permalink
Get rid of more code duplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
philikon committed May 12, 2010
1 parent b069b79 commit 19d7bbb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions content/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ Components.utils.import("resource://bartab/prototypes.js");

var BarTabPreferences = {

prefs: Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch)
.QueryInterface(Components.interfaces.nsIPrefBranch2),

init: function() {
this.prefs.addObserver("extensions.bartap.hostWhitelist", this, false);
BarTabUtils.mPrefs.addObserver("extensions.bartap.hostWhitelist", this, false);
this.onTimeoutChange();
this.onLoadChange();
this.updateHostWhitelist();
},

destroy: function() {
this.prefs.removeObserver("extensions.bartap.hostWhitelist", this);
BarTabUtils.mPrefs.removeObserver("extensions.bartap.hostWhitelist", this);
},

QueryInterface: function(aIID) {
Expand Down

0 comments on commit 19d7bbb

Please sign in to comment.