Skip to content

Instantly share code, notes, and snippets.

@Hagith
Created September 4, 2013 10:18
Show Gist options
  • Save Hagith/6435198 to your computer and use it in GitHub Desktop.
Save Hagith/6435198 to your computer and use it in GitHub Desktop.
Tizen init
document.querySelector('body').classList.add('tizen');
if (!window.indexedDB) {
window.indexedDB = window.webkitIndexedDB;
}
if (!window.MutationObserver) {
window.MutationObserver = window.WebKitMutationObserver;
}
document.addEventListener('tizenhwkey', function(e) {
if (e.keyName == "back") {
if (currentOverlay == null || currentOverlay == 'emptygallery') {
tizen.application.getCurrentApplication().exit();
} else {
showOverlay(null);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment