From 85d7b17746c72c9872ec61960c28a2c36171bafb Mon Sep 17 00:00:00 2001 From: "James (Jamalam)" <james@jamalam.tech> Date: Wed, 15 Nov 2023 15:09:04 +0000 Subject: [PATCH] register event, license --- LICENSE | 21 +++++++++++++++++++++ main.ts | 4 ++-- manifest.json | 2 +- package.json | 2 +- versions.json | 5 +++-- 5 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..035f085 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jamalam + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/main.ts b/main.ts index ef02d45..64f3f6a 100644 --- a/main.ts +++ b/main.ts @@ -18,7 +18,7 @@ export default class AutomaticTagsPlugin extends Plugin { this.addSettingTab(new AutomaticTagsSettingTab(this.app, this)); this.app.workspace.onLayoutReady(() => { - this.app.vault.on("create", async (file) => { + this.registerEvent(this.app.vault.on("create", async (file) => { if (Object.entries(this.settings.tags).length === 0) return; if (file instanceof TFile) { @@ -38,7 +38,7 @@ export default class AutomaticTagsPlugin extends Plugin { this.addOrUpdateTagsInMarkdown(contents, tags) ); } - }); + })); }); } diff --git a/manifest.json b/manifest.json index 4f9a667..27fbcfe 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "automatic-tags", "name": "Automatic Tags", - "version": "1.0.0", + "version": "1.0.1", "minAppVersion": "0.15.0", "description": "Add tags to new notes automatically based on their path.", "author": "Jamalam", diff --git a/package.json b/package.json index c948a1b..f685dd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-automatic-tags", - "version": "1.0.0", + "version": "1.0.1", "description": "Add tags to new notes automatically based on their path", "main": "main.js", "scripts": { diff --git a/versions.json b/versions.json index 26382a1..a6d5a03 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,4 @@ { - "1.0.0": "0.15.0" -} + "1.0.0": "0.15.0", + "1.0.1": "0.15.0" +} \ No newline at end of file