@dvlden/asb-detect
v1.0.2
Published
Simple Android stock-browser detection.
Downloads
4
Readme
Android Stock-Browser Detect
ASB-Detect has only one purpose – to detect any Android Stock-Browser and redirect visitor to download Google Chrome from the Android Market directly. There's simply no reason why anyone would use Stock-Browser that comes with older Android's, if there's Google Chrome for those devices. Google Chrome is default browser on newer Android devices...
Installation
Use your favourite package manager... In my case that's pnpm
.
pnpm i @dvlden/asb-detect
Usage
Browser
import { asb } from '@dvlden/asb-detect'
asb.detect()
Node
const { asb } = require('@dvlden/asb-detect')
asb.detect()
Options
You can write your own logic for detection with access to isStock
property.
if (asb.isStock) {
// do something...
}
You can pass an optional message to the detect()
function. If you want to omit the default one.
asb.detect('Your custom message, instead?')