소스 검색

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]);