Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wankdanker/approved-browser

Specify minimum versions of browsers and get accept/reject callbacks on approved/disapproved browsers
https://github.com/wankdanker/approved-browser

Last synced: 2 months ago
JSON representation

Specify minimum versions of browsers and get accept/reject callbacks on approved/disapproved browsers

Awesome Lists containing this project

README

        

approved-browser
----------------

[![Build Status](https://travis-ci.org/wankdanker/approved-browser.svg)](https://travis-ci.org/wankdanker/approved-browser)

Client side detection of required browser versions.

install
-------

```bash
npm install approved-browser
```

usage
-----

```js
var ab = require('approved-browser');

ab({
Chrome : 37
, Firefox : 28
, Safari : 6.1
, strict : false //if true any browser NOT listed will be rejected too.
}, function (approved, ua) {
if (!approved) {
//do thing for unapproved browsers such as...
window.location.href = '/support/unapproved-browser.html';
}
});
```

license
-------

MIT