The main boot kernel for TiddlyWiki. This single file creates a barebones TW environment that is just sufficient to bootstrap the modules containing the main logic of the application.
The main boot kernel for TiddlyWiki. This single file creates a barebones TW environment that is just sufficient to bootstrap the modules containing the main logic of the application.
On the server this file is executed directly to boot TiddlyWiki. In the browser, this file is packed into a single HTML file.
On the server this file is executed directly to boot TiddlyWiki. In the browser, this file is packed into a single HTML file.
\*/
\*/
var _boot = (function($tw) {
var _boot = (function($tw) {
/*jslint node: true, browser: true */
/*jslint node: true, browser: true */
/*global modules: false, $tw: false */
/*global modules: false, $tw: false */
"use strict";
"use strict";
// Include bootprefix if we're not given module data
// Include bootprefix if we're not given module data
if(!$tw) {
if(!$tw) {
$tw = require("./bootprefix.js").bootprefix();
$tw = require("./bootprefix.js").bootprefix();
}
}
$tw.utils = $tw.utils || Object.create(null);
$tw.utils = $tw.utils || Object.create(null);
/////////////////////////// Standard node.js libraries
/////////////////////////// Standard node.js libraries
promptMsg = ( $tw.language == undefined ? "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser" : $tw.language.getString("InternalJavaScriptError/Hint") );
promptMsg = ( $tw.language == undefined ? "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser" : $tw.language.getString("InternalJavaScriptError/Hint") );
Fill in any null or undefined properties of an object with the properties from a list of source objects. Each property that is an object is called recursively
Fill in any null or undefined properties of an object with the properties from a list of source objects. Each property that is an object is called recursively
Get the browser location.hash. We don't use location.hash because of the way that Firefox auto-urldecodes it (see http://stackoverflow.com/questions/1703552/encoding-of-window-location-hash)
Get the browser location.hash. We don't use location.hash because of the way that Firefox auto-urldecodes it (see http://stackoverflow.com/questions/1703552/encoding-of-window-location-hash)
submitText: text to use for submit button (defaults to "Login")
submitText: text to use for submit button (defaults to "Login")
serviceName: text of the human readable service name
serviceName: text of the human readable service name
noUserName: set true to disable username prompt
noUserName: set true to disable username prompt
canCancel: set true to enable a cancel button (callback called with null)
canCancel: set true to enable a cancel button (callback called with null)
repeatPassword: set true to prompt for the password twice
repeatPassword: set true to prompt for the password twice
callback: function to be called on submission with parameter of object {username:,password:}. Callback must return `true` to remove the password prompt
callback: function to be called on submission with parameter of object {username:,password:}. Callback must return `true` to remove the password prompt