Correct a mistake.
Change a little bit the detection for make it working all the time on all devices.
Invert, doesn't work otherwise.
Add the windowsphone class.
Add device.desktop() function. I have forgot it…
Deplace the WindowsTablet function into the Desktop block instead of the WindowsPhone.
Add a full support for the detection of the orientation.
Many devices don't have the orientation variable (like desktop browser), otherwise we can use the "new" function matchMedia, but it is only enable on new browser.
If both are not enable use the height and width of the screen.
Add the support for checking if it's ChromeMobile or FirefoxMobile. Add webkit otherwise.
Change the index.html for matching the new rules. Add the userAgent at the top of the page for debugging.