1.0.4 • Published 6 years ago

obh v1.0.4

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

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.

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago