2014-08-01 06:03:11 -07: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);
|
2014-08-15 07:34:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
function handleBitcoinURI(url) {
|
|
|
|
if (!url) return;
|
2014-10-09 06:19:13 -07:00
|
|
|
window.location = '#!/uri-payment/' + url;
|
2014-08-15 07:34:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
window.plugins.webintent.getUri(handleBitcoinURI);
|
|
|
|
window.plugins.webintent.onNewIntent(handleBitcoinURI);
|
2014-09-03 08:04:14 -07:00
|
|
|
window.handleOpenURL = handleBitcoinURI;
|
2014-10-25 15:57:12 -07:00
|
|
|
}
|