mirror of https://github.com/BTCPrivate/copay.git
36 lines
826 B
JavaScript
36 lines
826 B
JavaScript
'use strict';
|
|
|
|
angular.element(document).ready(function() {
|
|
var startAngular = function() {
|
|
angular.bootstrap(document, ['copayApp']);
|
|
};
|
|
/* Cordova specific Init */
|
|
if (window.cordova !== undefined) {
|
|
|
|
document.addEventListener('deviceready', function() {
|
|
|
|
document.addEventListener('pause', function() {
|
|
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();
|
|
}
|
|
|
|
});
|