Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/wankdanker/approved-browser
- Owner: wankdanker
- Created: 2015-04-07T17:16:33.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-31T18:36:09.000Z (over 9 years ago)
- Last Synced: 2024-10-12T23:43:25.716Z (3 months ago)
- Language: JavaScript
- Size: 128 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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