Преглед изворни кода

bugfix when using SingleFile and Scrapbook for SingleFile simultaneously

Gildas lormeau пре 15 година
родитељ
комит
a8a4088117

+ 1 - 1
WebContent/core/manifest.json

@@ -4,7 +4,7 @@
 		"16": "resources/icon_16.png",
 		"48": "resources/icon_48.png",
 		"128": "resources/icon_128.png" },
-	"version": "0.2.19",
+	"version": "0.2.20",
 	"description": "Page processor used by SingleFile",
 	"background_page" : "pages/background.html",
 	"content_scripts": [ {

+ 3 - 3
WebContent/core/scripts/bg/background.js

@@ -20,7 +20,7 @@
 
 (function() {
 
-	var DEFAULT_FILENAME_MAX_LENGTH = 90, DEFAULT_CONFIG = {
+	var DEFAULT_CONFIG = {
 		removeFrames : false,
 		removeScripts : true,
 		removeObjects : true,
@@ -28,7 +28,7 @@
 		removeUnusedCSSRules : false,
 		displayProcessedPage : false,
 		savePage : false,
-		filenameMaxLength : DEFAULT_FILENAME_MAX_LENGTH,
+		filenameMaxLength : 90,
 		processInBackground : true,
 		getContent : true,
 		getRawDoc : false
@@ -247,7 +247,7 @@
 
 	chrome.extension.onRequestExternal.addListener(function(request, sender, sendResponse) {
 		// console.log("onRequestExternal", request);
-		var property, config = DEFAULT_CONFIG;
+		var property, config = JSON.parse(JSON.stringify(DEFAULT_CONFIG));
 		if (request.config)
 			for (property in request.config)
 				config[property] = request.config[property];

+ 1 - 1
WebContent/ui/manifest.json

@@ -4,7 +4,7 @@
 		"16": "resources/icon_16.png",
 		"48": "resources/icon_48.png",
 		"128": "resources/icon_128.png" },
-	"version": "0.2.19",
+	"version": "0.2.20",
 	"description": "SingleFile helps you to archive a complete page into a single HTML file",
 	"background_page" : "pages/background.html",
 	"options_page": "pages/options.html",