mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 20:10:03 +00:00
fd82112700
Some of it belongs in the browser-sniff plugin Also add a `$:/info/node` info tiddler.
25 lines
580 B
JavaScript
25 lines
580 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;
|
|
};
|
|
|
|
})();
|