faisalman/ua-parser-js — pull request #3 by cadecairos (2012-11-01 21:17:59+00:00)
Title: Fix Safari version detection

Hello sir!

I recently used you excellent library in a project I work on, Popcorn Maker.

I noticed that your regex for the Safari browser wasn't working as it should so I have patched it up :D

Safari, like Opera, doesn't have the version number immediately following the name, they use a `Version` identifier. This wasn't being taken into account. Furthermore, the order of Version and browser name is also switched between Safari and Opera i.e. `Opera/9.8 Version/12` and `Version/6.0.1 Safari/536.12.123`

I fixed all that up so that it'd work with Safari. There's also some removal of end of line whitespace that was stripped by my editor automatically.