From ad1793c8f58f5732a16ba978bfe4aa787b3f590b Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 19 Dec 2015 18:52:25 +0000 Subject: [PATCH] Minor tweaks to boot kernel for AWS Part of the upcoming AWS integration work is a custom build of TiddlyWiki that can run as an Amazon Lambda function. These tweaks enable the new build to control the loading of SJCL, the package info, and any preloaded tiddlers. --- boot/boot.js | 12 ++++++------ boot/bootprefix.js | 9 ++++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index dab39238f..9d47c9ba8 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -590,7 +590,7 @@ Crypto helper object for encrypted content. It maintains the password text in a the password, and to encrypt/decrypt a block of text */ $tw.utils.Crypto = function() { - var sjcl = $tw.node ? require("./sjcl.js") : window.sjcl, + var sjcl = $tw.node ? (global.sjcl || require("./sjcl.js")) : window.sjcl, currentPassword = null, callSjcl = function(method,inputText,password) { password = password || currentPassword; @@ -1399,10 +1399,6 @@ $tw.loadTiddlersBrowser = function() { for(var t=0; t