frontend script API documentation

This commit is contained in:
azivner
2018-08-23 12:55:45 +02:00
parent 0e7372adbf
commit f5b89432a6
16 changed files with 241 additions and 125 deletions

View File

@@ -100,7 +100,7 @@ async function expandToNote(notePath, expandOpts) {
}
}
async function activateNode(notePath, newNote) {
async function activateNote(notePath, newNote) {
utils.assertArguments(notePath);
const node = await expandToNote(notePath);
@@ -295,7 +295,7 @@ async function treeInitialized() {
}
if (startNotePath) {
const node = await activateNode(startNotePath);
const node = await activateNote(startNotePath);
// looks like this this doesn't work when triggered immediatelly after activating node
// so waiting a second helps
@@ -562,7 +562,7 @@ $(window).bind('hashchange', function() {
if (getCurrentNotePath() !== notePath) {
console.log("Switching to " + notePath + " because of hash change");
activateNode(notePath);
activateNote(notePath);
}
});
@@ -579,7 +579,7 @@ export default {
setBranchBackgroundBasedOnProtectedStatus,
setProtected,
expandToNote,
activateNode,
activateNote,
getCurrentNode,
getCurrentNotePath,
setCurrentNotePathToHash,