Bug 784386 - Part 9: Move pageCacheHtml outside of loop. r=lucasr

This commit is contained in:
Brian Nicholson 2012-08-31 15:56:13 -07:00
parent 49399e08b0
commit 100f0212ea

View File

@ -406,14 +406,13 @@ Readability.prototype = {
* @return Element * @return Element
**/ **/
_grabArticle: function (page) { _grabArticle: function (page) {
let doc = this._doc;
let isPaging = (page !== null ? true: false);
page = page ? page : this._doc.body;
let pageCacheHtml = page.innerHTML;
while (true) { while (true) {
let doc = this._doc;
let stripUnlikelyCandidates = this._flagIsActive(this.FLAG_STRIP_UNLIKELYS); let stripUnlikelyCandidates = this._flagIsActive(this.FLAG_STRIP_UNLIKELYS);
let isPaging = (page !== null ? true: false);
page = page ? page : this._doc.body;
let pageCacheHtml = page.innerHTML;
let allElements = page.getElementsByTagName('*'); let allElements = page.getElementsByTagName('*');
// First, node prepping. Trash nodes that look cruddy (like ones with the // First, node prepping. Trash nodes that look cruddy (like ones with the