Created
April 14, 2012 14:47
-
-
Save replete/2384895 to your computer and use it in GitHub Desktop.
Insert UA/platform strings into html data attribute
This file contains 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
/* | |
!! DANGER DANGER WILL ROBINSON | |
*/ | |
document.documentElement.setAttribute('data-ua',navigator.userAgent); | |
document.documentElement.setAttribute('data-platform',navigator.platform); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment