Skip to content

Commit

Permalink
Update for Obsidian 1.4
Browse files Browse the repository at this point in the history
kepano committed Jul 27, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 79e562d commit c051c41
Showing 4 changed files with 16 additions and 17 deletions.
14 changes: 7 additions & 7 deletions main.js

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions main.ts
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ export default class Hider extends Plugin {
document.body.classList.toggle('hider-file-nav-header', this.settings.hideFileNavButtons);
document.body.classList.toggle('hider-search-counts', this.settings.hideSearchCounts);
document.body.classList.toggle('hider-instructions', this.settings.hideInstructions);
document.body.classList.toggle('hider-meta', this.settings.hideMeta);
document.body.classList.toggle('hider-meta', this.settings.hidePropertiesReading);
document.body.classList.toggle('hider-vault', this.settings.hideVault);
}

@@ -88,7 +88,7 @@ interface HiderSettings {
hideSearchSuggestions: boolean;
hideSearchCounts: boolean;
hideInstructions: boolean;
hideMeta: boolean;
hidePropertiesReading: boolean;
hideVault: boolean;
}
const DEFAULT_SETTINGS: HiderSettings = {
@@ -102,7 +102,7 @@ const DEFAULT_SETTINGS: HiderSettings = {
hideSearchSuggestions: false,
hideSearchCounts: false,
hideInstructions: false,
hideMeta: false,
hidePropertiesReading: false,
hideVault: false
}

@@ -242,17 +242,15 @@ class HiderSettingTab extends PluginSettingTab {
);

new Setting(containerEl)
.setName('Hide metadata block in Reading view')
.setDesc('When front matter is turned off in your Editor settings this hides the metadata block')
.addToggle(toggle => toggle.setValue(this.plugin.settings.hideMeta)
.setName('Hide properties in Reading view')
.setDesc('Hides the properties section in Reading view')
.addToggle(toggle => toggle.setValue(this.plugin.settings.hidePropertiesReading)
.onChange((value) => {
this.plugin.settings.hideMeta = value;
this.plugin.settings.hidePropertiesReading = value;
this.plugin.saveData(this.plugin.settings);
this.plugin.refresh();
})
);



}
}
2 changes: 1 addition & 1 deletion styles.css
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
}

/* Hide meta */
.hider-meta .frontmatter-container {
.hider-meta .markdown-reading-view .metadata-container {
display:none;
}

1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"1.3.0": "1.4.0",
"1.2.5": "0.16.0",
"1.2.4": "0.16.0",
"1.2.3": "0.16.0",

0 comments on commit c051c41

Please sign in to comment.