Last active
August 29, 2015 14:26
-
-
Save oleksapro/de7a215b3d715a85a95d to your computer and use it in GitHub Desktop.
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
function os() { | |
var os = 0; | |
if (navigator.userAgent.indexOf('Windows') != -1) return 'Windows'; | |
if (navigator.userAgent.indexOf('Linux') != -1) return 'Linux'; | |
if (navigator.userAgent.indexOf('Mac') != -1) return 'Mac'; | |
if (navigator.userAgent.indexOf('FreeBSD') != -1) return 'FreeBSD'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment