Simple UA Detection in JS. Link to the JS file from github as this is updated regularly.
Put this code in your head tag:
<script src="https://loganb2008.github.io/UA-Detection/UserAgentDetect.js">
detectUa(); // Get current useragent
detectUa("user agent here"); // Get specified useragent
getiOSVersion("user agent here");
Click here to visit the examples page
Nintendo DSi
Nintendo Wii
Nintendo Wii U
Nintendo 3DS
Opera
Edge
Yandex
Lynx
Chrome
Safari
Firefox
Playstation 4
Playstation Vita
Internet Explorer
Maxthon
QQ
UC Browser