瀏覽代碼

Ignore 1x1 images in hiddenImages rule

Gaël Métais 9 年之前
父節點
當前提交
3ff23e1c47
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/tools/phantomas/custom_modules/modules/domHiddenYLT/domHiddenYLT.js

+ 2 - 0
lib/tools/phantomas/custom_modules/modules/domHiddenYLT/domHiddenYLT.js

@@ -52,6 +52,8 @@ exports.module = function(phantomas) {
 
                                     if (src === '' || src.indexOf('data:image') === 0) continue;
 
+                                    if (images[i].width === 1 && images[i].height === 1) continue;
+
                                     if (!lazyLoadableImages[src]) {
                                         path = phantomas.getDOMPath(images[i]);