Add collapsing css class on load

This commit is contained in:
Lost Paul 2023-03-31 09:10:56 +02:00
parent 89df617d83
commit d4e49835ff
2 changed files with 6 additions and 1 deletions

View file

@ -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",

View file

@ -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) => {