Gets platform informations of a Web browser.
Load this package in a browser:
<scriptsrc="xslet.platform.min.js"></script>Get platform informations:
// On Firefox 48.0 and Window 10.0xslet.platform.ua.name// => 'FIREFOX'xslet.platform.ua.version// => '48'xslet.platform.ua.FIREFOX// => truexslet.platform.ua.MSIE// => falsexslet.platform.os.name// => 'WINNT'xslet.platform.os.version// => '10.0'xslet.platform.os.WINNT// => truexslet.platform.os.LINUX// => falseWrite CSS for each platform:
html.UA-FIREFOXP { background-color: red } /* for Firefox */html.UA-FIREFOX-48P { background-color: yellow } /* for Firefox 48 */html.OS-WINNTP { background-color: blue } /* for Windows */html.OS-WINNT-10_0P { background-color: cyan } /* for Windows 10.0 */This package provides API documents on Github.io or docs/index.html in this package.
This package has been checked the behavior by using this pages on the following platforms:
| Platform | Chrome | Firefox | Safari | Edge | IE11 |
|---|---|---|---|---|---|
| macOS | ◯ | ◯ | ◯ | ◯ | -- |
| Windows10 | ◯ | ◯ | -- | ◯ | ◯ |
| Linux | ◯ | ◯ | -- | ◯ | -- |
Copyright (C) 2016-2020 Takayuki Sato
This program is free software under MIT License. See the file LICENSE in this distribution for more details.