Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This plugin enables you to hide certain parts of the Obsidian UI. Note that your
- Hide tooltips
- Hide instructions in prompts
- Hide metadata in Reading view
- Hide pinned tab title

## Making your theme compatible with Hider

Expand All @@ -33,3 +34,4 @@ Hider injects the following classes on the `body` element when features are togg
| Tooltips | `.hider-tooltips` |
| Instructions | `.hider-instructions` |
| Metadata | `.hider-meta` |
| Pinned tab title | `.hider-pinned-tab-title` |
24 changes: 20 additions & 4 deletions main.js

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default class Hider extends Plugin {
document.body.classList.toggle('hider-instructions', this.settings.hideInstructions);
document.body.classList.toggle('hider-meta', this.settings.hidePropertiesReading);
document.body.classList.toggle('hider-vault', this.settings.hideVault);
document.body.classList.toggle('hider-pinned-tab-title', this.settings.hidePinnedTabTitle);
}

}
Expand All @@ -90,6 +91,7 @@ interface HiderSettings {
hideInstructions: boolean;
hidePropertiesReading: boolean;
hideVault: boolean;
hidePinnedTabTitle: boolean;
}
const DEFAULT_SETTINGS: HiderSettings = {
hideRibbon: false,
Expand All @@ -103,7 +105,8 @@ const DEFAULT_SETTINGS: HiderSettings = {
hideSearchCounts: false,
hideInstructions: false,
hidePropertiesReading: false,
hideVault: false
hideVault: false,
hidePinnedTabTitle: false
}

class HiderSettingTab extends PluginSettingTab {
Expand Down Expand Up @@ -252,5 +255,16 @@ class HiderSettingTab extends PluginSettingTab {
})
);

new Setting(containerEl)
.setName('Hide pinned tab title')
.setDesc('Hides the title of the pinned tab (similar to web browsers)')
.addToggle(toggle => toggle.setValue(this.plugin.settings.hidePinnedTabTitle)
.onChange((value) => {
this.plugin.settings.hidePinnedTabTitle = value;
this.plugin.saveData(this.plugin.settings);
this.plugin.refresh();
})
);

}
}
10 changes: 10 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,13 @@
.hider-file-nav-header .workspace-leaf-content[data-type=file-explorer] .nav-header {
display: none;
}

/* Hide pinned tab title */
.hider-pinned-tab-title .workspace-tab-header-inner-title:has(+ .workspace-tab-header-status-container .mod-pinned) {
display: none;
}
.hider-pinned-tab-title .workspace .mod-root .workspace-tab-header:has(.mod-pinned) {
width: unset;
min-width: unset;
flex: unset;
}