소스 검색

don't remove JSON-LD scripts

Gildas 7 년 전
부모
커밋
6a21a2a5e9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/single-file/single-file-core.js

+ 1 - 1
lib/single-file/single-file-core.js

@@ -314,7 +314,7 @@ const SingleFileCore = (() => {
 		}
 
 		removeScripts() {
-			this.doc.querySelectorAll("script").forEach(element => element.remove());
+			this.doc.querySelectorAll("script:(not[type=\"application/ld+json\"])").forEach(element => element.remove());
 		}
 
 		removeFrames() {