Detecting device orientation and acceleration in JavaScript | Hacker News Reader