work on hash & history

This commit is contained in:
zadam
2019-05-14 22:29:47 +02:00
parent 2178f82324
commit dd1fc23fe8
12 changed files with 123 additions and 78 deletions

View File

@@ -268,9 +268,13 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
/**
* @method
* @returns {Promise<string>} returns note path of active note
* @returns {Promise<string|null>} returns note path of active note or null if there isn't active note
*/
this.getActiveNotePath = treeService.getActiveNotePath;
this.getActiveNotePath = () => {
const activeTabContext = noteDetailService.getActiveTabContext();
return activeTabContext ? activeTabContext.notePath : null;
};
/**
* This method checks whether user navigated away from the note from which the scripts has been started.