0.3.2 • Published 4 years ago

@xslet/platform v0.3.2

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

@xslet/platform Github.io NPM version MIT License Coverage Status

Gets platform informations of a Web browser.

Install

Load this package in a browser:

<script src="xslet.platform.min.js"></script>

Usage

Get platform informations:

// On Firefox 48.0 and Window 10.0
xslet.platform.ua.name      // => 'FIREFOX'
xslet.platform.ua.version   // => '48'
xslet.platform.ua.FIREFOX   // => true
xslet.platform.ua.MSIE      // => false
xslet.platform.os.name      // => 'WINNT'
xslet.platform.os.version   // => '10.0'
xslet.platform.os.WINNT     // => true
xslet.platform.os.LINUX     // => false

Write CSS for each platform:

html.UA-FIREFOX P { background-color: red }       /* for Firefox */
html.UA-FIREFOX-48 P { background-color: yellow } /* for Firefox 48 */
html.OS-WINNT P { background-color: blue }        /* for Windows */
html.OS-WINNT-10_0 P { background-color: cyan }   /* for Windows 10.0 */

API

This package provides API documents on Github.io or docs/index.html in this package.

Checked

This package has been checked the behavior by using this pages on the following platforms:

PlatformChromeFirefoxSafariEdgeIE11
macOS--
Windows10--
Linux----

License

Copyright (C) 2016-2020 Takayuki Sato

This program is free software under MIT License. See the file LICENSE in this distribution for more details.

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.3

4 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.1

7 years ago

0.1.0

8 years ago