Wallet/js/mobile.js

26 lines
713 B
JavaScript
Raw Normal View History

2014-08-01 10:03:11 -03:00
'use strict';
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
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);
function handleBitcoinURI(url) {
if (!url) return;
2014-10-09 10:19:13 -03:00
window.location = '#!/uri-payment/' + url;
}
window.plugins.webintent.getUri(handleBitcoinURI);
window.plugins.webintent.onNewIntent(handleBitcoinURI);
window.handleOpenURL = handleBitcoinURI;
2014-10-25 19:57:12 -03:00
}