Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Commit d3e37da

Browse files
committed
refactor: clean up whitespace and commented code in main.ts
1 parent 04e7cf4 commit d3e37da

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

main.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {Plugin, Notice, Modal, App} from "obsidian";
22

3-
4-
53
interface Snippet {
64
id: string;
75
name: string;
@@ -37,7 +35,6 @@ export default class CssSnippetStore extends Plugin {
3735
console.error(error);
3836
new Notice(`Error: ${error.message}`);
3937
}
40-
4138
}
4239

4340
injectWhenSettingsLoaded() {
@@ -107,13 +104,12 @@ export default class CssSnippetStore extends Plugin {
107104
class CssSnippetStoreModal extends Modal {
108105
constructor(app: App, private snippets: Snippet[]) {
109106
super(app);
110-
// this.modalEl.addClass('mod-css-snippet-store'); // Custom class for styling
107+
// this.modalEl.addClass('mod-css-snippet-store'); // Custom class for styling
111108
}
112109

113110
async install(name: string, code: string) {
114111
const vault = this.app.vault;
115112
const adapter = vault.adapter;
116-
117113
const snippetFolderPath = '.obsidian/snippets';
118114
const fileName = name + '.css';
119115
const fullPath = `${snippetFolderPath}/${fileName}`;
@@ -141,12 +137,7 @@ class CssSnippetStoreModal extends Modal {
141137
}
142138

143139
onOpen() {
144-
145140
const { contentEl } = this;
146-
147-
148-
149-
150141
contentEl.createEl('h1', { text: 'CSS Snippet Store' });
151142
const grid = contentEl.createEl('div', { cls: 'snippet-store-grid'});
152143

@@ -177,11 +168,8 @@ class CssSnippetStoreModal extends Modal {
177168
console.error(error);
178169
new Notice(`Error: ${error.message}`);
179170
}
180-
181-
182171
});
183172

184-
185173
if (snippet.source) {
186174
const sourceBtn = buttonWrapper.createEl('a', {
187175
href: snippet.source,

0 commit comments

Comments
 (0)