@gct256/browser-detect
v1.0.2
Published
browser detection libray, based on current-device.
Downloads
2
Readme
browser-detect
A browser detecion libray, based on current-device.
usage
<script src="browser-detect.min.js"></script>
<style>
html.firefox .foo {
/* style for firefox */
}
html.chrome .foo {
/* style for chrome */
}
</style>
<script>
if (window.browserDetect.firefox()) {
// code for firefox
}
if (window.browserDetect.chrome()) {
// code for chrome
}
</script>
import { browserDetect } from 'browser-detect'; // ES modules
const { browserDetect } = require('browser-detect'); // CommonJS
if (broewserDetect.firefox()) {
// code for firefox
}
if (broewserDetect.chrome()) {
// code for chrome
}