vault backup: 2025-02-05 14:38:06

This commit is contained in:
2025-02-05 14:38:07 +01:00
parent 6ae96b0862
commit 23fd82117a
3738 changed files with 218546 additions and 24 deletions

View File

@@ -0,0 +1,18 @@
<%*
if (this.app.workspace.activeLeaf.view.currentMode.type != "source"){this.app.commands.executeCommandById("markdown:toggle-preview");}
let editor = this.app.workspace.activeLeaf.view.editor;
let timestamp = tp.date.now("HH:mm");
let linePrefix = "\n- [ ] " + timestamp + " ";
editor.focus();
if (this.app.isMobile) {
editor.setCursor(editor.lastLine());
editor.replaceSelection(linePrefix)
editor.setCursor(editor.lastLine());;
} else {
const initialLines = editor.lineCount();
editor.setCursor({ line: initialLines, ch: 0 });
editor.replaceSelection(linePrefix);
const finalLines = editor.lineCount();
editor.setCursor({ ch: 0, line: finalLines });
}
%>