Rewritten screen orientation detector on "ons.orientation".