mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 20:10:03 +00:00
3a67fdb768
There are still some warnings about making functions in a loop, but I’ll fix those as a separate pull request because the fixes are more than typographic errors.
25 lines
581 B
JavaScript
25 lines
581 B
JavaScript
/*\
|
|
title: $:/core/modules/info/platform.js
|
|
type: application/javascript
|
|
module-type: info
|
|
|
|
Initialise basic platform $:/info/ tiddlers
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
exports.getInfoTiddlerFields = function() {
|
|
var mapBoolean = function(value) {return value ? "yes" : "no";},
|
|
infoTiddlerFields = [];
|
|
// Basics
|
|
infoTiddlerFields.push({title: "$:/info/browser", text: mapBoolean(!!$tw.browser)});
|
|
infoTiddlerFields.push({title: "$:/info/node", text: mapBoolean(!!$tw.node)});
|
|
return infoTiddlerFields;
|
|
};
|
|
|
|
})();
|