Skip to content

Commit

Permalink
Remove duplicate code.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jul 12, 2016
1 parent 5a1fd77 commit 6c2f48d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions imp/js/imp.js
Expand Up @@ -198,14 +198,12 @@ var IMP_JS = {
return;
}

imgs = Prototype.Selector.select('IMG[data-src]', doc).findAll(Element.visible);
mb_height = mb.getHeight();

/* Load messages within 1 scrolled page of range boundaries. */
mb_height = mb.getHeight();
range_top = mb.scrollTop - mb_height;
range_bottom = mb.scrollTop + (2 * mb_height);

imgs = Prototype.Selector.select('IMG[data-src]', this.iframeDoc(iframe)).findAll(Element.visible);
imgs = Prototype.Selector.select('IMG[data-src]', doc).findAll(Element.visible);

if (imgs.size()) {
iframe.setStyle({ overflowY: 'hidden' });
Expand Down

0 comments on commit 6c2f48d

Please sign in to comment.