TW5: Can TW get the browser name?

51 views
Skip to first unread message

Chuck R.

unread,
Dec 19, 2019, 12:24:34 PM12/19/19
to TiddlyWiki
My system: TW5.1.19 running on tiddlyspot.com, markup is TW5

This is a minor issue, just out of curiosity. I found variables in TW5.1.19 that show if the TW is running in a browser, the width and height of the browser window and some other things. I was wondering if there was a variable that shows the browser name.

Chuck R.

unread,
Dec 20, 2019, 9:39:38 AM12/20/19
to TiddlyWiki
Found it. Under the Sidebar, under More, then Explorer, then info/ folder, then browser/ folder, there are a bunch of variables. Looks like I want $:/info/browser/name and $:/info/browser/version.

Chuck R.

unread,
Dec 20, 2019, 9:40:20 AM12/20/19
to TiddlyWiki
The Tiddler InfoMechanism also has a bunch of variables in there.

Eric Shulman

unread,
Dec 20, 2019, 9:56:49 AM12/20/19
to TiddlyWiki
On Friday, December 20, 2019 at 6:39:38 AM UTC-8, Chuck R. wrote:
Found it. Under the Sidebar, under More, then Explorer, then info/ folder, then browser/ folder, there are a bunch of variables. Looks like I want $:/info/browser/name and $:/info/browser/version.

Note that these particular tiddlers are only available if you install the "browser sniff" plugin.

To do that, go to the $:/ControlPanel, select the "plugins" tab, and press the big blue "Get more plugins" button.

This will display a modal dialog.  Press the big green "Open plugin library" button, and you will find an entry for:

Browser sniffing
$:/plugins/tiddlywiki/browser-sniff
5.1.21

Press the "install" button to add it to your current TiddlyWiki document.  Then save-and-reload for it to take effect.

Once that is completed, you will find $:/info/browser/name and $:/info/browser/version now exist in your document.

enjoy,
-e

Reply all
Reply to author
Forward
0 new messages