diff --git a/src/main.ts b/src/main.ts index e197431..94565c5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,7 @@ import { DateTime } from "luxon"; import Mustache from "mustache"; import { + addIcon, App, normalizePath, Notice, @@ -119,6 +120,23 @@ export default class OmnivorePlugin extends Plugin { }, }); + const iconId = "Omnivore"; + // add icon + addIcon( + iconId, + ` + + + + ` + ); + + // This creates an icon in the left ribbon. + this.addRibbonIcon(iconId, iconId, async (evt: MouseEvent) => { + // Called when the user clicks the icon. + await this.fetchOmnivore(); + }); + // This adds a settings tab so the user can configure various aspects of the plugin this.addSettingTab(new OmnivoreSettingTab(this.app, this)); }