This package has been deprecated

Author message:

obh is out of date, use bowser

obh
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Outdated-Browser Handler

helps to detect old browsers and show warning message. Browser detection's based on bowser.

Installation

npm install obh --save

How to use

const { OutdatedBrowserHandler } from 'obh';

OutdatedBrowserHandler.handle(document.body, {
  minVersions: {
    msie: '10',
    ios: '7.1',
    safari: '6.1',
    firefox: '28',
    opera: '12.1',
    edge: '12',
    chrome: '21',
    android: '4'
  },
  sourceUrl: 'https://path/to/file.html',
  userAgent: navigator.userAgent
}).then(isOkay => {
  if (isOkay) {
    <...> // continue to work
  }
});

or you can use

const { OutdatedBrowserHandler } from 'obh';

OutdatedBrowserHandler.handle(document.body, {
  minVersions: {
    msie: '10',
    ios: '7.1',
    safari: '6.1',
    firefox: '28',
    opera: '12.1',
    edge: '12',
    chrome: '21',
    android: '4'
  },
  template: `
    <h1>Your browser is outdated</h1>
  `,
  userAgent: navigator.userAgent
}).then(isOkay => {
  if (isOkay) {
    <...> // continue to work
  }
});

License

Licensed as MIT. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i obh

      Weekly Downloads

      0

      Version

      1.0.4

      License

      MIT

      Unpacked Size

      53.3 kB

      Total Files

      8

      Last publish

      Collaborators

      • aristocr2t