From b935bf0db209603d29d5d8717357d78969f76436 Mon Sep 17 00:00:00 2001 From: Nuthrash Date: Sun, 1 Jan 2023 00:10:38 +0800 Subject: [PATCH] Version 1.0.7 1. Fix setting page table color in dark mode. (issue #6) 2. Refactor CSS isolation facilities from Shadow DOM to IFrame. (issue #7) 3. Refactor related facilities for IFrame and isolate all Operating Modes. 4. Remove some useless HTML Sanitization attributes for Obsidian platform. --- README.md | 37 +- .../screenshots/OperatingModeSettings1.jpg | Bin 199339 -> 200024 bytes manifest.json | 2 +- package.json | 2 +- src/HtmlPluginOpMode.ts | 43 +- src/HtmlView.ts | 455 ++++++++---------- versions.json | 3 +- 7 files changed, 239 insertions(+), 303 deletions(-) diff --git a/README.md b/README.md index e619019..81624d4 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ This is a plugin for Obsidian (https://obsidian.md). Can open document with `.ht 1. Head to ⚙"Settings" ⇨ "Community plugins" options page, find the settings icon ⚙ of "**HTML Reader**" item, then click it. 2. Or, Head to ⚙"Settings" ⇨ click "**HTML Reader**" item on the bottom of left panel under the "Community plugins" group after enabled it. + ### Operating Mode ![OperatingModeSettings1.jpg](./assets/images/screenshots/OperatingModeSettings1.jpg "HTML Reader Setting part1") @@ -47,45 +48,51 @@ Set Operating Mode (a.k.a **OpMode**) for this plugin to protect user and app. | | Images | Styles | Scripting | DSD* | CSP# | HTML Sanitization | Isolated | | ---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | **Text Mode** | No | No | No | Yes | Yes | Yes | Yes | -| **High Restricted Mode** | Yes | Partial | No | Yes | Yes | Yes | Yes | +| **High Restricted Mode** | Yes[1] | Partial | No | Yes | Yes | Yes | Yes | | **Balance Mode** | Yes | Yes | No | Yes | Yes | Yes | Yes | -| **Low Restricted Mode** | Yes | Yes | Partial[1] | Yes | No | No | Yes | -| **Unrestricted Mode** | Yes | Yes | Yes[2] | No[3] | No | No | No | +| **Low Restricted Mode** | Yes | Yes | Partial[2] | Yes | No | No | Yes | +| **Unrestricted Mode** | Yes | Yes | Yes[3] | Yes | No | No | Yes | *: [Declarative Shadow DOM](https://web.dev/declarative-shadow-dom/)
#: [Content Security Policy](https://en.wikipedia.org/wiki/Content_Security_Policy)
-[1]: The script codes inside `