Handle android menu button
This commit is contained in:
parent
d62883e88f
commit
df226e16b6
1 changed files with 9 additions and 0 deletions
|
|
@ -112,6 +112,15 @@
|
||||||
|
|
||||||
function onDeviceReady() {
|
function onDeviceReady() {
|
||||||
setTimeout(function(){ navigator.splashscreen.hide(); }, 2000);
|
setTimeout(function(){ navigator.splashscreen.hide(); }, 2000);
|
||||||
|
|
||||||
|
document.addEventListener("menubutton", function() {
|
||||||
|
var nav = document.getElementsByTagName('nav')[0];
|
||||||
|
if (!nav) return;
|
||||||
|
|
||||||
|
var menu = nav.getElementsByTagName('section')[0].getElementsByTagName('a')[0];
|
||||||
|
if (menu.offsetParent) menu.click();
|
||||||
|
|
||||||
|
}, false);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue