Git Product home page Git Product logo

detect.js's Introduction

Detect.js

Like the title says. Fairly accurate browser detection, though I only had a chance to test it on Windows (Chrome/Firefox) and Linux (Chrome/Firefox).

Examples

var info = new Detect({format: false});

To view the full object, console.log(info)

output: 
{
	browser: {
		short_version: browserShortVersion,
		name         : "browserName",
		engine       : "browserEngine", 
		version      : "browserVersion",
	},
	
	os: {
		architecture: systemBits,
		system: "systemName",
	},

	plugins: {
		[INSTALLED_PLUGINS_LIST]
	},

	supports: {
		[BROWSER_SUPPORTS_FEATURE_LIST]
	},
}

Options

Key Value Type Default
add_classes Add detected browser and system information to the class list of the HTML node. bool true
ignore (plugins|os|browser|supports) - Remove the respective element from the output. object N/A

detect.js's People

Contributors

aapis avatar

Watchers

James Cloos avatar  avatar

detect.js's Issues

Mobile browser QA testing

Add support for:

  • iPad (latest iOS)
  • iPhone (latest iOS)
  • Blackberry 10
  • Android*

And any others so long as there are enough users to justify the effort.

*note: I don't have any Android devices anymore (my Nexus 7 got fried somehow) so someone else will have to provide this functionality.

Broken in IE11

No errors because the IE dev tools are shite, no idea what's wrong. Much debugging required.

Desktop browser QA testing

Windows: Chrome, Firefox, Opera and IE.
Linux: Chrome, Firefox.
OSX: Safari, Chrome, Firefox, Opera.

1.1.0 should be compatible with all modern browsers on major platforms.

Sanitize plugin names

Some plugin names include things like © and whatnot. Remove characters like that from the output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.