matthewhudson/device.js — pull request #39 by mkai (2013-09-24 14:56:53+00:00)
Title: Fixed detection of orientation support

Hi,

Your use of CoffeeScript's ``in`` keyword while detecting orientation support generates an __indexOf() search for "orientationchange" in the window object. I assume this is not what you intended - therefore I changed it to

```coffeescript
_supports_orientation = "onorientationchange" of window
```

Which translates to (JavaScript):

```javascript
var _supports_orientation;
_supports_orientation = "onorientationchange" in window;
```

This will also cut down the size of the JavaScript a bit because the generated __indexOf method is no longer needed in the JS file.