mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
decoupled protected session holder from presentation stuff and similar things
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
//import messagingService from './messaging.js';
|
||||
//import ScriptContext from './script_context.js';
|
||||
import messagingService from './messaging.js';
|
||||
|
||||
function reloadApp() {
|
||||
window.location.reload(true);
|
||||
@@ -116,14 +115,6 @@ async function stopWatch(what, func) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
async function executeBundle(bundle) {
|
||||
const apiContext = ScriptContext(bundle.note, bundle.allNotes);
|
||||
|
||||
return await (function () {
|
||||
return eval(`const apiContext = this; (async function() { ${bundle.script}\r\n})()`);
|
||||
}.call(apiContext));
|
||||
}
|
||||
|
||||
function formatValueWithWhitespace(val) {
|
||||
return /[^\w_-]/.test(val) ? '"' + val + '"' : val;
|
||||
}
|
||||
@@ -263,7 +254,6 @@ export default {
|
||||
isRootNode,
|
||||
escapeHtml,
|
||||
stopWatch,
|
||||
executeBundle,
|
||||
formatValueWithWhitespace,
|
||||
formatLabel,
|
||||
requireLibrary,
|
||||
|
||||
Reference in New Issue
Block a user