소스 검색

expose insertSingleFileComment (fix #702)

Gildas 4 년 전
부모
커밋
1a2545c7b0
3개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 1
      extension/core/bg/config.js
  2. 0 1
      extension/core/content/content.js
  3. 0 1
      lib/single-file/index.js

+ 2 - 1
extension/core/bg/config.js

@@ -101,7 +101,8 @@ const DEFAULT_CONFIG = {
 	warnUnsavedPage: true,
 	autoSaveExternalSave: false,
 	insertMetaNoIndex: false,
-	passReferrerOnError: false
+	passReferrerOnError: false,
+	insertSingleFileComment: true
 };
 
 let configStorage;

+ 0 - 1
extension/core/content/content.js

@@ -114,7 +114,6 @@ async function processPage(options) {
 	ui.onStartPage(options);
 	processor = new singlefile.SingleFile(options);
 	const preInitializationPromises = [];
-	options.insertSingleFileComment = true;
 	options.insertCanonicalLink = true;
 	if (!options.saveRawPage) {
 		if (!options.removeFrames && frames && globalThis.frames && globalThis.frames.length) {

+ 0 - 1
lib/single-file/index.js

@@ -71,7 +71,6 @@ async function getPageData(options = {}, initOptions, doc = globalThis.document,
 	}
 	options.doc = doc;
 	options.win = win;
-	options.insertSingleFileComment = true;
 	options.insertCanonicalLink = true;
 	options.onprogress = event => {
 		if (event.type === event.RESOURCES_INITIALIZED && doc && win && options.loadDeferredImages) {