Ver Fonte

added resolveFragmentIdentifierURLs option

Former-commit-id: be0f379ce8dd4c8255cdf543e22474507c04e465
Gildas há 6 anos atrás
pai
commit
7e653498fd
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 2 1
      extension/core/bg/config.js
  2. 1 1
      lib/single-file/single-file-core.js

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

@@ -76,7 +76,8 @@ singlefile.extension.core.bg.config = (() => {
 		removeAlternativeImages: true,
 		groupDuplicateImages: true,
 		saveRawPage: false,
-		saveToClipboard: false
+		saveToClipboard: false,
+		resolveFragmentIdentifierURLs: false
 	};
 
 	let pendingUpgradePromise = upgrade();

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

@@ -803,7 +803,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 					}
 					if (resolvedURL) {
 						const url = Util.normalizeURL(this.options.url);
-						if (resolvedURL.startsWith(url + "#")) {
+						if (resolvedURL.startsWith(url + "#") && !this.options.resolveFragmentIdentifierURLs) {
 							resolvedURL = resolvedURL.substring(url.length);
 						}
 						try {