Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ytisf committed Aug 29, 2024
1 parent 89bbfea commit 19b5646
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ class EnrichIndicator {
httpFunction = fetchUrl;
}

const activeLeaf = this.app.workspace.activeLeaf;
// const activeLeaf = this.app.workspace.activeLeaf;

if (activeLeaf) {
// const editor = activeLeaf.view.sourceMode.cmEditor;
const noteTitle = this.app.workspace.getActiveFile().basename;
const noteTitle = editor.file.basename;

const search_type = identifyInput(noteTitle);
const url_to_get = `https://www.virustotal.com/api/v3/${search_type}/${noteTitle}`;
Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ class EnrichIndicator {
httpFunction = fetchUrl;
}

const activeLeaf = this.app.workspace.activeLeaf;
// const activeLeaf = this.app.workspace.activeLeaf;

if (activeLeaf) {
// const editor = activeLeaf.view.sourceMode.cmEditor;
const noteTitle = this.app.workspace.getActiveFile().basename;
const noteTitle = editor.file.basename;

const search_type = identifyInput(noteTitle);
const url_to_get = `https://www.virustotal.com/api/v3/${search_type}/${noteTitle}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ class EnrichIndicator {
httpFunction = fetchUrl;
}

const activeLeaf = this.app.workspace.activeLeaf;
// const activeLeaf = this.app.workspace.activeLeaf;

if (activeLeaf) {
// const editor = activeLeaf.view.sourceMode.cmEditor;
const noteTitle = this.app.workspace.getActiveFile().basename;
const noteTitle = editor.file.basename;

const search_type = identifyInput(noteTitle);
const url_to_get = `https://www.virustotal.com/api/v3/${search_type}/${noteTitle}`;
Expand Down

0 comments on commit 19b5646

Please sign in to comment.