xuijs / xui

A tiny javascript framework for mobile web apps.
http://xuijs.com
789 stars 106 forks source link

Simple OS and Device Detection #75

Closed vernonk closed 10 years ago

vernonk commented 12 years ago

I saw on your road map that you wanted to be able to include simple OS and device detection. This pull request does just that.

I tried to keep it very minimal to keep in the overall lightness of xui to begin with.

Example: x$.os.iphone (would return a boolean)

Devices: x$.os.iphone x$.os.ipod x$.os.ipad x$.os.android x$.os.blackberry Will return true for webkit based Blackberry phones x$.os.blackberryplaybook x$.os.windowsphone x$.os.kindlefire x$.os.phone x$.os.tablet x$.os.desktop x$.os.othermobile

afryer commented 11 years ago

Just a thought but would this not be better as a pull request as an xui plugin as opposed to core?