Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apostrophe-browser-support

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-browser-support - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

.npmignore

2

package.json
{
"name": "apostrophe-browser-support",
"version": "0.5.2",
"version": "0.5.3",
"description": "Maintain the aesthetic of your website by restricting old browsers from seeing it.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -46,3 +46,3 @@ var blacklist = window.blacklist;

$('.graylist-modal-outer').show();
$('#x-button').click(function(){
$('#x').click(function(){
$('.graylist-modal-outer').hide();

@@ -49,0 +49,0 @@ });

#apostrophe-browser-support
An amazing little apostrophe module that does everything you could ever dream of.
##Table of Contents
* [Intro](#intro)
* [How to use it](#how-to-use-it)
* [Blacklisting](#blacklisting)
* [Graylisting](#graylisting)
##Intro
apostrophe-browser-support accepts a `blacklist` and `graylist` from the user. These lists will be used to either entirely restrict a user from seeing the website or warn them when they log-on that they are using a browser that is not recommended by the website owner.
In `modules` of `app.js`:
```javascript
'apostrophe-browser-support': {
blacklist: [
{ name: 'IE', version: 7, ignoreBelow: true }
]
},
```
##How to use it
In `modules`:
'apostrophe-browser-support': {
blacklist: [
{name: 'browserName', version: 'browserVersion'}
]
},
`browserVersion` should be the most recent version of the browser you do not want the user to see.
###Blacklisting
The blacklist is an array of browsers and browser versions that the website owner specifically does not want to see the website. All blacklisted browsers will be served a page telling them to update or install a new browser if they want to view the site.
In the example below, users with Internet Explorer 7 and older will be blocked from viewing the website:
```javascript
'apostrophe-browser-support': {
blacklist: [
{ name: 'IE', version: 7}
]
}
```
If you *only* want to block Internet Explorer 7:
```javascript
'apostrophe-browser-support': {
blacklist: [
{ name: 'IE', version: 7, ignoreOlder: true }
]
}
```
###Graylisting
The graylist is an array browsers and browser version just like the blacklist. However, when a user logs on to the website with a browser and browser version in the graylist, the website will display a modal warning them that they are using an old browser and they should consider downloading a new one.
Graylists are also different than blacklists in that they do not display the modal for all browser versions older than the one specified by default.
In the example below, users with Internet Explorer 9 will see a modal warning them that their browser is old and they should update their browser:
```javascript
'apostrophe-browser-support': {
graylist: [
{ name: 'IE', version: 9 }
]
}
```
If you want to show the modal for Internet Explorer 9 *and* every version older than IE 9:
```javascript
'apostrophe-browser-support': {
graylist: [
{ name: 'IE', version: 9, includeOlder: true }
]
}
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc