startup script running fix

This commit is contained in:
azivner 2018-04-04 23:51:47 -04:00
parent fb54678fef
commit 6ed6e27602
3 changed files with 5 additions and 3 deletions

View File

@ -89,4 +89,4 @@ entrypoints.registerEntrypoints();
tooltip.setupTooltip(); tooltip.setupTooltip();
$(document).ready(bundle.executeStartupBundles); bundle.executeStartupBundles();

View File

@ -1,5 +1,6 @@
import treeService from './tree.js'; import treeService from './tree.js';
import server from './server.js'; import server from './server.js';
import utils from './utils.js';
function ScriptApi(startNote, currentNote) { function ScriptApi(startNote, currentNote) {
const $pluginButtons = $("#plugin-buttons"); const $pluginButtons = $("#plugin-buttons");
@ -52,7 +53,8 @@ function ScriptApi(startNote, currentNote) {
addButtonToToolbar, addButtonToToolbar,
activateNote, activateNote,
getInstanceName: () => window.glob.instanceName, getInstanceName: () => window.glob.instanceName,
runOnServer runOnServer,
formatDateISO: utils.formatDateISO
} }
} }

View File

@ -18,7 +18,7 @@ async function run(req) {
return { executionResult: result }; return { executionResult: result };
} }
async function getStartupBundles(req) { async function getStartupBundles() {
const notes = await labelService.getNotesWithLabel("run", "frontendStartup"); const notes = await labelService.getNotesWithLabel("run", "frontendStartup");
const bundles = []; const bundles = [];