From 87c8b361eac650d358e9332ee4f4c5010f4372e6 Mon Sep 17 00:00:00 2001 From: Sunshine Date: Wed, 25 Dec 2019 19:00:58 -0500 Subject: [PATCH] add ADR-0002 (NOSCRIPT nodes) --- README.md | 3 +++ docs/arch/0002-noscript-nodes.md | 19 +++++++++++++++++++ docs/arch/0005-asset-minimization.md | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 docs/arch/0002-noscript-nodes.md diff --git a/README.md b/README.md index 6a6bfa7..3dccbd9 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ If compared to saving websites with `wget -mpk`, this tool embeds all assets as $ snap install monolith #### From source + + Dependency: `libssl-dev` + $ git clone https://github.com/Y2Z/monolith.git $ cd monolith $ make install diff --git a/docs/arch/0002-noscript-nodes.md b/docs/arch/0002-noscript-nodes.md new file mode 100644 index 0000000..230e7ce --- /dev/null +++ b/docs/arch/0002-noscript-nodes.md @@ -0,0 +1,19 @@ +# 2. NOSCRIPT nodes + +Date: 2020-04-16 + +## Status + +Accepted + +## Context + +HTML pages sometimes contain NOSCRIPT nodes, which reveal their contents only in case when JavaScript is not available. Most of the time they contain hidden messages that inform about certain JavaScript-dependent features not being operational, however sometimes can also feature media assets or even iframes. + +## Decision + +When the document is being saved with or without JavaScript, each NOSCRIPT node should be preserved while its children need to be processed exactly the same way as the rest of the document. This approach will ensure that even hidden remote assets are embedded — since those hidden elements may have to be displayed later in a browser that has JavaScript turned off. An option should be available to "unwrap" all NOSCRIPT nodes in order to make their contents always visible in the document, complimenting the "disable JS" function of the program. + +## Consequences + +Saved documents will have contents of all NOSCRIPT nodes processed as if they are part of the document's DOM, therefore properly display images encapsulated within NOSCRIPT nodes when being viewed in browsers that have JavaScript turned off (or have no JavaScript support in the first place). The new option to "unwrap" NOSCRIPT elements will help the user ensure that the resulting document always represents what the original web page looked like in a browser that had JavaScript turned off. diff --git a/docs/arch/0005-asset-minimization.md b/docs/arch/0005-asset-minimization.md index 0e487e3..175fbac 100644 --- a/docs/arch/0005-asset-minimization.md +++ b/docs/arch/0005-asset-minimization.md @@ -21,5 +21,5 @@ saved by monolith, if needed. ## Consequences -Monolith will not support modification of original document assets for the purpose of reducing their size, sticking to performing only a minimal +Monolith will not support modification of original document assets for the purpose of reducing their size, sticking to performing only minimal amount of modifications to the original web page — whatever is needed to provide security or exclude unwanted asset types.