diff --git a/src/settings-tab.ts b/src/settings-tab.ts index e2448ca..c947e42 100644 --- a/src/settings-tab.ts +++ b/src/settings-tab.ts @@ -76,21 +76,6 @@ export class CustomFramesSettingTab extends PluginSettingTab { await this.plugin.saveSettings(); }); }); - new Setting(this.containerEl) - .setName("Minimum Width") - .setDesc(createFragment(f => { - f.createSpan({ text: "The width that this frame's pane should be adjusted to automatically if it is lower. Set to 0 to disable." }); - f.createEl("br"); - f.createEl("em", { text: "Note that this is only applied on Desktop." }); - })) - .addText(t => { - t.inputEl.type = "number"; - t.setValue(String(frame.minimumWidth)); - t.onChange(async v => { - frame.minimumWidth = v.length ? Number(v) : 0; - await this.plugin.saveSettings(); - }); - }); new Setting(this.containerEl) .setName("Additional CSS") .setDesc(createFragment(f => { diff --git a/src/settings.ts b/src/settings.ts index 0fbddd3..0099c3c 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -8,15 +8,13 @@ export const presets: Record = { displayName: "Obsidian Forum", icon: "edit", hideOnMobile: true, - minimumWidth: 367, customCss: "" }, - "calendar": { + "calendar": { url: "https://calendar.google.com/calendar/u/0/r/day", displayName: "Google Calendar", icon: "calendar", hideOnMobile: true, - minimumWidth: 490, customCss: `/* hide right-side menu, and some buttons */ div.d6McF, div.pw6cBb, @@ -33,7 +31,6 @@ div.dwlvNd { displayName: "Google Keep", icon: "files", hideOnMobile: true, - minimumWidth: 370, customCss: `/* hide the menu bar and the "Keep" text */ .PvRhvb-qAWA2, .gb_2d.gb_Zc { display: none !important; @@ -44,7 +41,6 @@ div.dwlvNd { displayName: "Notion", icon: "box", hideOnMobile: true, - minimumWidth: 400, customCss: "" }, "twitter": { @@ -52,7 +48,6 @@ div.dwlvNd { displayName: "Twitter", icon: "twitter", hideOnMobile: true, - minimumWidth: 400, customCss: "" } }; @@ -67,6 +62,5 @@ export interface CustomFrame { displayName: string; icon: string; hideOnMobile: boolean; - minimumWidth: number; customCss: string; } diff --git a/src/view.ts b/src/view.ts index 4156025..46a67ed 100644 --- a/src/view.ts +++ b/src/view.ts @@ -55,15 +55,6 @@ export class CustomFrameView extends ItemView { this.frame.setAttribute("allowpopups", ""); this.frame.addEventListener("dom-ready", () => { this.frame.insertCSS(this.data.customCss); - - if (this.data.minimumWidth) { - let parent = this.contentEl.closest(".workspace-split.mod-horizontal"); - if (parent) { - let minWidth = `${this.data.minimumWidth + 2 * this.settings.padding}px`; - if (parent.style.width < minWidth) - parent.style.width = minWidth; - } - } }); } else {