Skip to content

Instantly share code, notes, and snippets.

View ixisio's full-sized avatar
🎯
Focusing

Andreas Klein ixisio

🎯
Focusing
View GitHub Profile
@ixisio
ixisio / detect.js
Last active December 11, 2015 20:28 — forked from tvandervossen/environment.js
device = function() {
var
, flags = {}
, ua = navigator.userAgent
, el = document.createElement('div')
, root = document.documentElement
, i
function flag(names) {
root.className += (root.className ? ' ' : '') + names