TiddlyWiki5/core/modules/info/platform.js

25 wiersze
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;
};
})();