copay/js/init.js

40 lines
964 B
JavaScript

'use strict';
angular.element(document).ready(function() {
// this is now in HTML tab, witch is compatible with Windows Phone
// var startAngular = function() {
// angular.bootstrap(document, ['copayApp']);
// };
/* Cordova specific Init */
if (window.cordova !== undefined) {
document.addEventListener('deviceready', function() {
document.addEventListener('pause', function() {
if (!window.ignoreMobilePause) {
window.location = '#!';
}
});
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
function handleBitcoinURI(url) {
if (!url) return;
window.location = '#!/uri-payment/' + url;
}
window.plugins.webintent.getUri(handleBitcoinURI);
window.plugins.webintent.onNewIntent(handleBitcoinURI);
window.handleOpenURL = handleBitcoinURI;
// startAngular();
}, false);
} else {
// startAngular();
}
});