Since I know we'll only be supporting a few things, I figured I'd capture some of the work I did today generating a regex to work with javascript conditionals based on useragent:
/(Trident|Firefox|Android|OPR|Chrome)/ |Version\/([0-9.]) (?:Mobile\/\S )(Safari)/g
The above identifes and captures browser and version for IE8+, firefox, android browser, opera, chrome, and safari.
Since I know we'll only be supporting a few things, I figured I'd capture some of the work I did today generating a regex to work with javascript conditionals based on useragent:
/(Trident|Firefox|Android|OPR|Chrome)/ |Version\/([0-9.]) (?:Mobile\/\S )(Safari)/g The above identifes and captures browser and version for IE8+, firefox, android browser, opera, chrome, and safari.