1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 02:19:55 +00:00

Add $:/info/browser/language to the info mechanism

This commit is contained in:
Jermolene 2019-03-07 18:42:49 +00:00
parent 6de13e2f60
commit c036c22826
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,8 @@ exports.getInfoTiddlerFields = function() {
// Screen size
infoTiddlerFields.push({title: "$:/info/browser/screen/width", text: window.screen.width.toString()});
infoTiddlerFields.push({title: "$:/info/browser/screen/height", text: window.screen.height.toString()});
// Language
infoTiddlerFields.push({title: "$:/info/browser/language", text: navigator.language || ""});
}
return infoTiddlerFields;
};

View File

@ -1,5 +1,5 @@
created: 20140720164948099
modified: 20161017122011379
modified: 20190307175403915
tags: Mechanisms
title: InfoMechanism
type: text/vnd.tiddlywiki
@ -14,6 +14,7 @@ System tiddlers in the namespace `$:/info/` are used to expose information about
|!Title |!Description |
|[[$:/info/browser]] |Running in the browser? ("yes" or "no") |
|[[$:/info/browser/language]] |<<.from-version "5.1.20">> Language as reported by browser (note that some browsers report two character codes such as `en` while others report full codes such as `en-GB`) |
|[[$:/info/browser/screen/width]] |Screen width in pixels |
|[[$:/info/browser/screen/height]] |Screen height in pixels |
|[[$:/info/node]] |Running under [[Node.js]]? ("yes" or "no") |