Bug 1116231 - Move reader.parse-on-load. pref change observer back to Reader.js. r=bnicholson

--HG--
extra : rebase_source : bfd297fd0af91bbfce62c22db0ca7a958ab4430f
This commit is contained in:
Margaret Leibovic 2014-12-29 15:12:45 -05:00
parent e98ae2130e
commit bc67e7b4cf
2 changed files with 6 additions and 11 deletions

View File

@ -85,6 +85,12 @@ let Reader = {
ReaderMode.removeArticleFromCache(uri).catch(e => Cu.reportError("Error removing article from cache: " + e));
break;
}
case "nsPref:changed":
if (aData.startsWith("reader.parse-on-load.")) {
this.isEnabledForParseOnLoad = this._getStateForParseOnLoad();
}
break;
}
},

View File

@ -27,17 +27,6 @@ let ReaderMode = {
// performance reasons)
MAX_ELEMS_TO_PARSE: 3000,
observe: function(aMessage, aTopic, aData) {
switch(aTopic) {
case "nsPref:changed": {
if (aData.startsWith("reader.parse-on-load.")) {
this.isEnabledForParseOnLoad = this._getStateForParseOnLoad();
}
break;
}
}
},
/**
* Gets an article from a loaded browser's document. This method will parse the document
* if it does not find the article in the cache.