Skip to content

Commit f320d58

Browse files
committed
Removes default hotkey combo and bumps version to 0.0.6
1 parent 11e9b4d commit f320d58

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

main.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,9 @@ export default class MyPlugin extends Plugin {
88
id: 'insert-footnote',
99
name: 'Insert Footnote',
1010
checkCallback: (checking: boolean) => {
11-
if (checking) {
12-
return !!this.app.workspace.getActiveViewOfType(MarkdownView);
13-
}
14-
11+
if (checking) return !!this.app.workspace.getActiveViewOfType(MarkdownView);
1512
this.insertFootnote();
16-
},
17-
hotkeys: [
18-
{
19-
modifiers: ["Command", "Shift"],
20-
key: "6",
21-
}]
13+
}
2214
});
2315
}
2416

@@ -35,7 +27,7 @@ export default class MyPlugin extends Plugin {
3527
let markdownText = mdView.data;
3628

3729
// check if we're in a footnote detail line ("[^1]: footnote")
38-
// if so, jump cursor back to original line if we have a previous jumping-off point
30+
// if so, jump cursor back to the footnote in the text
3931
let detailLineRegex = /\[\^(\d+)\]\:/;
4032
const cursorPosition = editor.getCursor();
4133
let lineText = editor.getLine(cursorPosition.line);
@@ -47,7 +39,7 @@ export default class MyPlugin extends Plugin {
4739
let footnote = s.replace(":", "");
4840

4941
let returnLineIndex = cursorPosition.line;
50-
// find the first line where this footnote exists in the text
42+
// find the FIRST OCCURENCE where this footnote exists in the text
5143
for(let i = 0; i < doc.lineCount(); i++) {
5244
let scanLine = doc.getLine(i);
5345
if(scanLine.contains(footnote)) {

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"id": "obsidian-footnotes",
33
"name": "Footnote Shortcut",
4-
"version": "0.0.5",
4+
"version": "0.0.6",
55
"minAppVersion": "0.9.12",
6-
"description": "Insert and write a new footnote faster",
6+
"description": "Insert and write footnotes faster",
77
"author": "Alexis Rondeau",
88
"authorUrl": "https://publish.obsidian.md/alexisrondeau",
99
"isDesktopOnly": false

0 commit comments

Comments
 (0)