Created
December 15, 2015 06:24
-
-
Save inaz2/df1e987b6f0bf8202908 to your computer and use it in GitHub Desktop.
Check browser user-agent and enabled plugins
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
<!DOCTYPE html> | |
<title>Browser Info</title> | |
<body> | |
<script> | |
(function(){ | |
function $E(tagName, textContent){ | |
var elem = document.createElement(tagName); | |
elem.textContent = textContent; | |
return elem; | |
} | |
document.body.appendChild($E("p", navigator.userAgent)); | |
var ul = $E("ul"); | |
Array.prototype.forEach.call(navigator.plugins, function(v){ | |
ul.appendChild($E("li", v.name + " (" + v.version + ")")); | |
}); | |
document.body.appendChild(ul); | |
})(); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://htmlpreview.github.io/?https://gist.githubusercontent.com/inaz2/df1e987b6f0bf8202908/raw/browserinfo.html