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

browser-detection

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-detection

browser-detection [![Build Status](https://travis-ci.org/sub2home/browser-detection.png?branch=master)](https://travis-ci.org/sub2home/browser-detection) ========================

  • 0.3.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-63.64%
Maintainers
1
Weekly downloads
 
Created
Source

browser-detection Build Status

Lightweight package to get information about browser, version and OS.

Installation

$ bower install browserdetection --save

Usage

Get Data
var data = browserDetection();

console.log(data.browser); // chrome
console.log(data.version); // 29
console.log(data.os); // osx
Add CSS classes to html tag

Javascript:

browserDetection({
    addClasses: true
});

CSS:

html{
    background: white;
}

/* Internet Explorer 7 specific */
html.ie-7{
    background: red;
}

/* Only for OSX users with firefox */
html.osx.firefox{
    background: blue;
}

Todo

  • More tests for...
  • osx
  • win
  • linux
  • mobile
  • Minification with grunt

FAQs

Package last updated on 29 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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