From d4e49835ffcd81da74442746a030ce87a2926cb7 Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Fri, 31 Mar 2023 09:10:56 +0200 Subject: [PATCH] Add collapsing css class on load --- manifest.json | 2 +- src/main.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index df1a0be..6a11989 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "folder-notes", "name": "Folder notes", - "version": "1.1.0", + "version": "1.1.1", "minAppVersion": "0.15.0", "description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.", "author": "Lost Paul", diff --git a/src/main.ts b/src/main.ts index 512ac0d..f24149d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,6 +25,11 @@ export default class FolderNotesPlugin extends Plugin { } else { document.body.classList.remove('folder-note-underline'); } + if (this.settings.enableCollapsing) { + document.body.classList.add('fn-whitespace-collapsing'); + } else { + document.body.classList.remove('fn-whitespace-collapsing'); + } new Commands(this.app, this).registerCommands(); this.observer = new MutationObserver((mutations: MutationRecord[]) => { mutations.forEach((rec) => {