diff --git a/manifest.json b/manifest.json index 999a974..22ebaa9 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "simple-banner", "name": "Simple Banner", - "version": "0.5.3", + "version": "0.5.4", "minAppVersion": "1.8.9", "description": "Visually enhance your notes with a customizable banner. Supports icons and time/date display.", "author": "Sandro Ducceschi", diff --git a/package-lock.json b/package-lock.json index 08f3ff2..7d1cc84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-banner", - "version": "0.5.3", + "version": "0.5.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simple-banner", - "version": "0.5.3", + "version": "0.5.4", "license": "MIT", "devDependencies": { "@types/node": "^16.11.6", diff --git a/package.json b/package.json index 6a79b1c..b71eb68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-banner", - "version": "0.5.3", + "version": "0.5.4", "description": "Visually enhance your notes with a customizable banner. Supports icons and time/date display.", "main": "dist/main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index e8f8905..28728c5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -205,6 +205,15 @@ export default class SimpleBanner extends Plugin { targets.forEach((t) => { t.remove() }); + + if (this.settings.properties.autohide) { + const inline = document.querySelector('.inline-title'); + const meta = document.querySelector('.metadata-container'); + if (inline && meta) { + inline.after(meta); + } + } + // @ts-ignore Store.delete(view?.leaf.id); delete container.dataset.sb; @@ -291,10 +300,10 @@ export default class SimpleBanner extends Plugin { const view = this.getActiveView(); if (view) { if (this.settings.properties.autohide) { - const propsContainer = document.querySelector('.metadata-container'); - const parent = propsContainer?.parentNode; - if (parent && parent.firstChild !== propsContainer) { - parent.prepend(propsContainer); + const inline = document.querySelector('.inline-title'); + const meta = document.querySelector('.metadata-container'); + if (inline && meta) { + inline.before(meta); } } // @ts-ignore