Skip to content

Commit

Permalink
register event, license
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalam360 committed Nov 15, 2023
1 parent 646c0f6 commit 85d7b17
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -38,7 +38,7 @@ export default class AutomaticTagsPlugin extends Plugin {
this.addOrUpdateTagsInMarkdown(contents, tags)
);
}
});
}));
});
}

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
5 changes: 3 additions & 2 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"1.0.0": "0.15.0"
}
"1.0.0": "0.15.0",
"1.0.1": "0.15.0"
}

0 comments on commit 85d7b17

Please sign in to comment.