Skip to content

Instantly share code, notes, and snippets.

@brianchirls
Created December 3, 2014 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianchirls/86fd81abd2e557dfaabc to your computer and use it in GitHub Desktop.
Save brianchirls/86fd81abd2e557dfaabc to your computer and use it in GitHub Desktop.
screen lock orientation
if (screen.lockOrientation) {
screen.lockOrientation('portrait-primary');
} else if (screen.mozLockOrientation) {
screen.mozLockOrientation('portrait-primary');
} else if (screen.orientation && screen.orientation.lock) {
screen.orientation.lock('portrait-primary');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment