merge #51: expose windowing to other plugins

Expose Windowing APIs to Other Plugins
This commit is contained in:
Tom 2025-03-15 22:06:39 +11:00 committed by GitHub
commit f4e827253d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -478,6 +478,12 @@ class TrayPlugin extends obsidian.Plugin {
cleanup();
}
getCurrentWindow = getCurrentWindow
getWindows = getWindows;
showWindows = showWindows;
hideWindows = hideWindows;
toggleWindows = toggleWindows;
async loadSettings() {
const DEFAULT_SETTINGS = OPTIONS.map((opt) => ({ [opt.key]: opt.default }));
this.settings = Object.assign(...DEFAULT_SETTINGS, await this.loadData());