Created
March 20, 2012 20:11
-
-
Save ackernaut/2140799 to your computer and use it in GitHub Desktop.
JS: UA and Platform on HTML tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var htmlAttr = document.documentElement; | |
htmlAttr.setAttribute('data-useragent', navigator.userAgent); | |
htmlAttr.setAttribute('data-platform', navigator.platform); | |
// See https://gist.github.com/2140827 for CSS | |
// Thanks, Rogie! http://rog.ie/post/9089341529/html5boilerplatejs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment