This commit is contained in:
zadam
2023-07-15 12:07:45 +02:00
parent 9d24499fef
commit 48f03f7a1b
18 changed files with 377 additions and 197 deletions

View File

@@ -107,7 +107,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
this.openTabWithNote = async (notePath, activate) => {
await ws.waitForMaxKnownEntityChangeId();
await appContext.tabManager.openContextWithNote(notePath, { activate });
await appContext.tabManager.openTabWithNoteWithHoisting(notePath, { activate });
if (activate) {
await appContext.triggerEvent('focusAndSelectTitle');
@@ -506,7 +506,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* Return randomly generated string of given length. This random string generation is NOT cryptographically secure.
*
* @method
* @param {integer} length of the string
* @param {int} length of the string
* @returns {string} random string
*/
this.randomString = utils.randomString;
@@ -516,7 +516,15 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* @param {int} size in bytes
* @return {string} formatted string
*/
this.formatNoteSize = utils.formatNoteSize;
this.formatSize = utils.formatSize;
/**
* @method
* @param {int} size in bytes
* @return {string} formatted string
* @deprecated - use api.formatSize()
*/
this.formatNoteSize = utils.formatSize;
this.logMessages = {};
this.logSpacedUpdates = {};