generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.ts
28 lines (20 loc) · 737 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import {Plugin} from 'obsidian';
import AccountLinkerSettingTab from './src/settings/AccountLinkerSettingTab'
import { AccountLinkerSettings,DEFAULT_SETTINGS } from 'src/settings/AccountLinkerSettings';
import {frontmatterProcessor} from 'src/drawing/frontmatterProcessor';
export default class AccountLinker extends Plugin {
settings: AccountLinkerSettings;
async onload() {
await this.loadSettings();
this.registerMarkdownPostProcessor(frontmatterProcessor(this))
this.addSettingTab(new AccountLinkerSettingTab(this.app,this));
}
onunload() {
}
async loadSettings() {
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
}
async saveSettings() {
await this.saveData(this.settings);
}
}