Skip to content

Commit

Permalink
fix: make the settings collapsible
Browse files Browse the repository at this point in the history
  • Loading branch information
sywhb committed Mar 7, 2023
1 parent e18df0b commit 71da2c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,12 @@ class OmnivoreSettingTab extends PluginSettingTab {

// create a group of general settings
containerEl.createEl("h3", {
cls: "collapsible",
cls: "omnivore-collapsible",
text: "General Settings",
});

const generalSettings = containerEl.createEl("div", {
cls: "content",
cls: "omnivore-content",
});

new Setting(generalSettings)
Expand Down Expand Up @@ -598,12 +598,12 @@ class OmnivoreSettingTab extends PluginSettingTab {
);

containerEl.createEl("h3", {
cls: "collapsible",
cls: "omnivore-collapsible",
text: "Advanced Settings",
});

const advancedSettings = containerEl.createEl("div", {
cls: "content",
cls: "omnivore-content",
});

new Setting(advancedSettings)
Expand All @@ -629,7 +629,7 @@ class OmnivoreSettingTab extends PluginSettingTab {

for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function () {
this.classList.toggle("active");
this.classList.toggle("omnivore-active");
const content = this.nextElementSibling;
if (content.style.maxHeight) {
content.style.maxHeight = null;
Expand Down

0 comments on commit 71da2c2

Please sign in to comment.