Paper Clip (Save HTML)

Save plain HTML of selection; optimized for printing. Hotkey: Command + Shift + S

目前為 2023-05-10 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Schimon
評價
0 0 0
版本
23.05.09
建立日期
2023-05-10
更新日期
2023-05-10
尺寸
14.6 KB
授權條款
MIT
腳本執行於
所有網站

📎 Paper Clip

Save selected contents to a private and plain HTML file.

This userscript saves the common (root) HTML element, of given selection, and all of its child elements into a printing-optimized HTML file. This program is useful in cases you want a tightly and quick reference without extra resources and media.


Features

  • Instant save (no waiting time);
  • Optimized for annotation, notes and printing;
  • Easy to manipulate HTML;
  • Omit privacy compromising contents (frames, media, scripts etc.);
  • Media urls are kept as references.
  • Media is listed under Site Information;
  • Strips attributes of tags;
  • Resulted filesize is as small as can be.

Comparison

Tested on this page. This is a comparison of common available ways (default behaviour): | Software | Complete | Page | Selection | | ------------ | --------- | --------- | --------- | | Save HTML | - | 14 KiB | 4 KiB | | Wget | - | 24 KiB | - | | Falkon | 350 KiB | 24 KiB | - | | Writer (ODT) | - | 33 KiB | 32 KiB | | SingleFile | 600 KiB | - | 580 KiB | | Save Page WE | 1.3 MiB | - | - |


Motivation

This script was written because of the following reasons:

  • Some save-page extensions are not available to Falkon Web Browser.
  • The maintained save-page extensions are designed to save large portions of a webpage in order to make an authentic copy, hence unnecessary data (e.g. css, fonts, images etc.) is pulled, and may cause to a resulted file of 500KB sized up to 5MB sized and above.
  • FocusWriter Word Processor ignores hyperlinks, hence copy and paste task has to be made in a meticulous manner, which is both time consuming and might not always be accurate all the time.
  • LibreOffice takes time to load, so the copy and paste task might take between 30 to 60 seconds.
  • ODT files are often larger than an average subject HTML file.

Example Site Information

Tag Value
url https://www.corbettreport.com/5thgen/
date Tue May 09 2023 15:29:39 GMT+0200
creator org.openuserjs.sjehuda.paperclip
user-agent Mozilla/5.0 (Wayland; Linux postmarketOS) Falkon/23.04.3
content-type-sourced text/html
charset-sourced UTF-8
viewport-imported width=device-width,initial-scale=1
description-imported We are in the middle of a world-changing war. . . .
generator-imported All in One SEO (AIOSEO) 4.3.6.1
extracted media: audio https://www.corbettreport.com/mp3/episode441_5th_gen.mp3?_=1
extracted media: iframe https://odysee.com/$/embed/@corbettreport:0/ep441-5thgen:0

Recommended Userscripts

✂️ Scissors

Remove selected contents from page.


Upcoming changes

  • ~Convert embedded elements (e.g. iframe) to links;~ (cancelled)
  • ~Save links of embedded elements (e.g. iframe) to meta tags;~ (cancelled)
  • ~Omit elements with no content (e.g. <tag></tag>);~ (done)
  • ~Save images;~ (cancelled)
  • Multiple modes (Markdown, PDF, Screenshot);
  • Save to HTMLZ;
  • Bookmarklet.

Falkon Designed for Falkon web browser

postmarketOS Designed for postmarketOS Linux