npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@flexem/browser-update

v1.3.0

Published

Old browser notification script.

Downloads

7

Readme

Browser Update

This is a little javascript that detects the user's browser and shows a warning message if the browser is too old.

If the user clicks the notification bar he is redirected to Google's "WhatBrowser" Page (no ads).

This is based on the www.browser-update.org script. See LICENSE file for more information.

Installation via Bower

You can install it via Bower with: bower install browser-update

The following browsers will be notified by default:

  1. IE <= 9
  2. Firefox <= 34
  3. Opera <= 12
  4. Safari <= 6.2
  5. Netscape Navigator <= 12
  6. Chrome - Automatic

The following OSes and browsers will not be notified since there is no up to date version of browser

  1. Windows NT 4.0, 5.0
  2. Windows 98
  3. OSX 10.2, 10.3, 10.4, 10.5
  4. Firefox ESR
  5. Opera 12 on Linux
  6. Browsers versions bellow vsmin

The following OSes and browsers will not be notified

  1. IE => 11 - See issue #1

The following options can be passed to the script:

var $buoop = {

    vs: {i:6,f:2,o:9.63,s:2,c:10}, 	// browser versions to notify
    reminder: 24,                   // after how many hours should the message reappear
                                    // 0 = show all the time
    reminderClosed: 150             // if the user closes message it reappears after x hours
    onshow: function(infos){},      // callback function after the bar has appeared
    onclick: function(infos){},     // callback function if bar was clicked
    onclose: function(infos){},     //

    l: false,                       // set a language for the message, e.g. "en"
                                    // overrides the default detection
    test: false,                    // true = always show the bar (for testing)
    text: "",                       // custom notification html text
    text_xx: "",                    // custom notification text for language "xx"
                                    // e.g. text_de for german and text_it for italian
    newwindow: true                 // open link in new window/tab
};

You can overwrite the default CSS

.buorg {
    background: #FDF2AB no-repeat 1em 0.55em url(warning.png);

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    border-bottom: 1px solid #A29330;

    color:#000;
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 12px;
    text-align: left;

    cursor: pointer;
}
.buorg div {
    padding: 5px 36px 5px 40px;
}
.buorg a {
    color:#E25600;
}
#buorgclose {
    position: absolute;
    right: .5em;
    top: .2em;

    padding: 0;
    height: 20px;
    width: 12px;

    font-size: 14px;
    font-weight: bold;
}