mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-18 07:40:42 +00:00
Move browser sniffing into a plugin
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/*\
|
||||
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)});
|
||||
return infoTiddlerFields;
|
||||
};
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user