I need a simple script written to quickly detect the presence of an accelerometer on mobile devices and redirect the visitor to a page based on the output.
It appears to me that the DeviceOrientationEvent has the best mobile web browser compatibility for this project:
[url removed, login to view]
How I imagine it working:
On load --> detect orientation
Delay 100 milliseconds
Detect orientation again --> if same as original value, redirect to page URL "A" --> if different from original value, redirect to page URL "B"
Resources:[url removed, login to view]