mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Add $:/info/browser/language to the info mechanism
This commit is contained in:
parent
6de13e2f60
commit
c036c22826
@ -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;
|
||||
};
|
||||
|
@ -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") |
|
||||
|
Loading…
Reference in New Issue
Block a user