Просмотр исходного кода

Merge branch 'master' of https://github.com/gildas-lormeau/SingleFile

Former-commit-id: f02e8cf214b53289915ce97f1648bd6ecdf5c72f
Gildas 6 лет назад
Родитель
Сommit
509bad3b02
3 измененных файлов с 25 добавлено и 24 удалено
  1. 11 11
      cli/single-file
  2. 3 2
      faq.md
  3. 11 11
      maff2html/single-file

+ 11 - 11
cli/single-file

@@ -104,27 +104,27 @@ const args = require("yargs")
 	.options("remove-frames", { description: "Remove frames (puppeteer, webdriver-gecko, webdriver-chromium)" })
 	.options("remove-frames", { description: "Remove frames (puppeteer, webdriver-gecko, webdriver-chromium)" })
 	.boolean("remove-frames")
 	.boolean("remove-frames")
 	.options("remove-hidden-elements", { description: "Remove HTML elements which are not displayed" })
 	.options("remove-hidden-elements", { description: "Remove HTML elements which are not displayed" })
-	.number("remove-hidden-elements")
+	.boolean("remove-hidden-elements")
 	.options("remove-unused-styles", { description: "Remove unused CSS rules and unneeded declarations" })
 	.options("remove-unused-styles", { description: "Remove unused CSS rules and unneeded declarations" })
-	.number("remove-unused-styles")
+	.boolean("remove-unused-styles")
 	.options("remove-unused-fonts", { description: "Remove unused CSS font rules" })
 	.options("remove-unused-fonts", { description: "Remove unused CSS font rules" })
-	.number("remove-unused-fonts")
+	.boolean("remove-unused-fonts")
 	.options("remove-imports", { description: "Remove HTML imports" })
 	.options("remove-imports", { description: "Remove HTML imports" })
-	.number("remove-imports")
+	.boolean("remove-imports")
 	.options("remove-scripts", { description: "Remove JavaScript scripts" })
 	.options("remove-scripts", { description: "Remove JavaScript scripts" })
-	.number("remove-scripts")
+	.boolean("remove-scripts")
 	.options("remove-audio-src", { description: "Remove source of audio elements" })
 	.options("remove-audio-src", { description: "Remove source of audio elements" })
-	.number("remove-audio-src")
+	.boolean("remove-audio-src")
 	.options("remove-video-src", { description: "Remove source of video elements" })
 	.options("remove-video-src", { description: "Remove source of video elements" })
-	.number("remove-video-src")
+	.boolean("remove-video-src")
 	.options("remove-alternative-fonts", { description: "Remove alternative fonts to the ones displayed" })
 	.options("remove-alternative-fonts", { description: "Remove alternative fonts to the ones displayed" })
-	.number("remove-alternative-fonts")
+	.boolean("remove-alternative-fonts")
 	.options("remove-alternative-medias", { description: "Remove alternative CSS stylesheets" })
 	.options("remove-alternative-medias", { description: "Remove alternative CSS stylesheets" })
-	.number("remove-alternative-medias")
+	.boolean("remove-alternative-medias")
 	.options("remove-alternative-images", { description: "Remove images for alternative sizes of screen" })
 	.options("remove-alternative-images", { description: "Remove images for alternative sizes of screen" })
-	.number("remove-alternative-images")
+	.boolean("remove-alternative-images")
 	.options("save-raw-page", { description: "Save the original page without interpreting it into the browser (puppeteer, webdriver-gecko, webdriver-chromium)" })
 	.options("save-raw-page", { description: "Save the original page without interpreting it into the browser (puppeteer, webdriver-gecko, webdriver-chromium)" })
-	.number("save-raw-page")
+	.boolean("save-raw-page")
 	.options("web-driver-executable-path", { description: "Path to Selenium WebDriver executable (webdriver-gecko, webdriver-chromium)" })
 	.options("web-driver-executable-path", { description: "Path to Selenium WebDriver executable (webdriver-gecko, webdriver-chromium)" })
 	.string("web-driver-executable-path")
 	.string("web-driver-executable-path")
 	.argv;
 	.argv;

+ 3 - 2
faq.md

@@ -1,7 +1,7 @@
 # FAQ
 # FAQ
 
 
 ## Does SingleFile upload any data to third-party servers?
 ## Does SingleFile upload any data to third-party servers?
-As stated in the [privacy policy](https://github.com/gildas-lormeau/SingleFile/blob/master/privacy.md), SingleFile does not upload any data to third-party servers. All the work is done in your browser. However, when you save a page with SingleFile, it can download resources (images, CSS, frame contents, fonts etc.) that are not displayed or not cached but present in the page.
+As stated in the [privacy policy](https://github.com/gildas-lormeau/SingleFile/blob/master/privacy.md), SingleFile does not upload any data to third-party servers. All the work is done in your browser. However, when you save a page with SingleFile, it can download resources (images, CSS, frame contents, fonts etc.) that are not displayed or not already cached but present in the page.
 
 
 ## Why can't I save some pages like https://addons.mozilla.org/addon/single-file?
 ## Why can't I save some pages like https://addons.mozilla.org/addon/single-file?
 For security purposes, browsers block web extensions on certain domains. This prevents a malicious extension to remove or change bad reviews, for example.
 For security purposes, browsers block web extensions on certain domains. This prevents a malicious extension to remove or change bad reviews, for example.
@@ -29,4 +29,5 @@ You can also disable the options below. Some resources (e.g. images, frames) on
 
 
 ## Why pages saved with SingleFile weight more than uncompressed MAFF files?
 ## Why pages saved with SingleFile weight more than uncompressed MAFF files?
 To integrate them into the HTML file, all binary resources such as images or fonts are transformed into [data URIs](https://en.wikipedia.org/wiki/Data_URI_scheme). These URIs allow the binary content to be encoded in [base64](https://en.wikipedia.org/wiki/Base64) and to be stored as text in the HTML file. When encoded in base64, a binary resource will weigh about 33% more. This overload also has an impact on the size of the saved page.
 To integrate them into the HTML file, all binary resources such as images or fonts are transformed into [data URIs](https://en.wikipedia.org/wiki/Data_URI_scheme). These URIs allow the binary content to be encoded in [base64](https://en.wikipedia.org/wiki/Base64) and to be stored as text in the HTML file. When encoded in base64, a binary resource will weigh about 33% more. This overload also has an impact on the size of the saved page.
-If you're using Firefox, you may consider using [SingleFileZ](https://github.com/gildas-lormeau/SingleFileZ) which is able to compress saved pages and their assets. 
+
+If you're using Firefox, you may consider using [SingleFileZ](https://github.com/gildas-lormeau/SingleFileZ) which is able to compress saved pages and their assets into a self extracting HTML/ZIP hybrid file. 

+ 11 - 11
maff2html/single-file

@@ -98,27 +98,27 @@ const args = require("yargs")
 	.options("remove-frames", { description: "Remove frames" })
 	.options("remove-frames", { description: "Remove frames" })
 	.boolean("remove-frames")
 	.boolean("remove-frames")
 	.options("remove-hidden-elements", { description: "Remove HTML elements which are not displayed" })
 	.options("remove-hidden-elements", { description: "Remove HTML elements which are not displayed" })
-	.number("remove-hidden-elements")
+	.boolean("remove-hidden-elements")
 	.options("remove-unused-styles", { description: "Remove unused CSS rules and unneeded declarations" })
 	.options("remove-unused-styles", { description: "Remove unused CSS rules and unneeded declarations" })
-	.number("remove-unused-styles")
+	.boolean("remove-unused-styles")
 	.options("remove-unused-fonts", { description: "Remove unused CSS font rules" })
 	.options("remove-unused-fonts", { description: "Remove unused CSS font rules" })
-	.number("remove-unused-fonts")
+	.boolean("remove-unused-fonts")
 	.options("remove-imports", { description: "Remove HTML imports" })
 	.options("remove-imports", { description: "Remove HTML imports" })
-	.number("remove-imports")
+	.boolean("remove-imports")
 	.options("remove-scripts", { description: "Remove JavaScript scripts" })
 	.options("remove-scripts", { description: "Remove JavaScript scripts" })
-	.number("remove-scripts")
+	.boolean("remove-scripts")
 	.options("remove-audio-src", { description: "Remove source of audio elements" })
 	.options("remove-audio-src", { description: "Remove source of audio elements" })
-	.number("remove-audio-src")
+	.boolean("remove-audio-src")
 	.options("remove-video-src", { description: "Remove source of video elements" })
 	.options("remove-video-src", { description: "Remove source of video elements" })
-	.number("remove-video-src")
+	.boolean("remove-video-src")
 	.options("remove-alternative-fonts", { description: "Remove alternative fonts to the ones displayed" })
 	.options("remove-alternative-fonts", { description: "Remove alternative fonts to the ones displayed" })
-	.number("remove-alternative-fonts")
+	.boolean("remove-alternative-fonts")
 	.options("remove-alternative-medias", { description: "Remove alternative CSS stylesheets" })
 	.options("remove-alternative-medias", { description: "Remove alternative CSS stylesheets" })
-	.number("remove-alternative-medias")
+	.boolean("remove-alternative-medias")
 	.options("remove-alternative-images", { description: "Remove images for alternative sizes of screen" })
 	.options("remove-alternative-images", { description: "Remove images for alternative sizes of screen" })
-	.number("remove-alternative-images")
+	.boolean("remove-alternative-images")
 	.options("save-raw-page", { description: "Save the original page without interpreting it into the browser" })
 	.options("save-raw-page", { description: "Save the original page without interpreting it into the browser" })
-	.number("save-raw-page")
+	.boolean("save-raw-page")
 	.options("web-driver-executable-path", { description: "Path to Selenium WebDriver executable" })
 	.options("web-driver-executable-path", { description: "Path to Selenium WebDriver executable" })
 	.string("web-driver-executable-path")
 	.string("web-driver-executable-path")
 	.argv;
 	.argv;