diff --git a/core/acknowledgements.tid b/core/acknowledgements.tid
index cb54e3d23..e1015e2c9 100644
--- a/core/acknowledgements.tid
+++ b/core/acknowledgements.tid
@@ -5,7 +5,3 @@ TiddlyWiki incorporates code from these fine OpenSource projects:
* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]
* [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]]
* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]
-
-And media from these projects:
-
-* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]
diff --git a/core/images/language.tid b/core/images/language.tid
new file mode 100644
index 000000000..bb4061495
--- /dev/null
+++ b/core/images/language.tid
@@ -0,0 +1,5 @@
+title: $:/core/images/language
+tags: $:/tags/Image
+
+\parameters (size:"22pt")
+
\ No newline at end of file
diff --git a/core/language/en-GB/icon.tid b/core/language/en-GB/icon.tid
deleted file mode 100644
index 1967b895f..000000000
--- a/core/language/en-GB/icon.tid
+++ /dev/null
@@ -1,13 +0,0 @@
-title: $:/languages/en-GB/icon
-type: image/svg+xml
-
-
diff --git a/core/modules/filters/math.js b/core/modules/filters/math.js
index ed8e5eed6..6b1d45f08 100644
--- a/core/modules/filters/math.js
+++ b/core/modules/filters/math.js
@@ -128,7 +128,7 @@ exports.minall = makeNumericReducingOperator(
exports.median = makeNumericArrayOperator(
function(values) {
var len = values.length, median;
- values.sort();
+ values.sort(function(a,b) {return a-b});
if(len % 2) {
// Odd, return the middle number
median = values[(len - 1) / 2];
diff --git a/core/modules/filters/moduleproperty.js b/core/modules/filters/moduleproperty.js
index 8f3559b09..2aa0e6a0c 100644
--- a/core/modules/filters/moduleproperty.js
+++ b/core/modules/filters/moduleproperty.js
@@ -18,9 +18,16 @@ Export our filter function
exports.moduleproperty = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
- var value = require(title)[operator.operand || ""];
- if(value !== undefined) {
- results.push(value);
+ try {
+ var value = require(title)[operator.operand || ""];
+ if(value !== undefined) {
+ if(typeof value !== "string") {
+ value = JSON.stringify(value);
+ }
+ results.push(value);
+ }
+ } catch(e) {
+ // Do nothing. It probably wasn't a module.
}
});
results.sort();
diff --git a/core/modules/startup/startup.js b/core/modules/startup/startup.js
index 21e756b30..d4f02efaf 100755
--- a/core/modules/startup/startup.js
+++ b/core/modules/startup/startup.js
@@ -52,14 +52,16 @@ exports.startup = function() {
}
// Initialise version
$tw.version = $tw.utils.extractVersionInfo();
- // Execute any startup actions
- $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction");
- if($tw.browser) {
- $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser");
- }
- if($tw.node) {
- $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node");
- }
+ // Set up the performance framework
+ $tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,"no") === "yes");
+ // Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers
+ $tw.rootWidget = new widget.widget({
+ type: "widget",
+ children: []
+ },{
+ wiki: $tw.wiki,
+ document: $tw.browser ? document : $tw.fakeDocument
+ });
// Kick off the language manager and switcher
$tw.language = new $tw.Language();
$tw.languageSwitcher = new $tw.PluginSwitcher({
@@ -102,6 +104,14 @@ exports.startup = function() {
handlerMethod: "handleKeydownEvent"
}]);
}
+ // Execute any startup actions
+ $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction");
+ if($tw.browser) {
+ $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser");
+ }
+ if($tw.node) {
+ $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node");
+ }
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
$tw.wiki.clearTiddlerEventQueue();
// Find a working syncadaptor
diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js
index bf0a7bb79..9d3a07414 100644
--- a/core/modules/widgets/checkbox.js
+++ b/core/modules/widgets/checkbox.js
@@ -157,7 +157,7 @@ CheckboxWidget.prototype.getValue = function() {
if(this.checkboxTag) {
return false;
}
- if(this.checkboxField) {
+ if(this.checkboxField || this.checkboxIndex) {
if(this.checkboxDefault === this.checkboxChecked) {
return true;
}
diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid
index 3315b5a23..085b3bfd9 100644
--- a/core/ui/PageControls/language.tid
+++ b/core/ui/PageControls/language.tid
@@ -7,11 +7,7 @@ description: {{$:/language/Buttons/Language/Hint}}