Wallet/js/init.js

47 lines
1.2 KiB
JavaScript
Raw Normal View History

2014-03-14 17:38:27 -03:00
'use strict';
2014-04-30 12:25:33 -03:00
2014-03-14 17:38:27 -03:00
angular.element(document).ready(function() {
2015-01-03 13:59:18 -03:00
// this is now in HTML tab, witch is compatible with Windows Phone
// var startAngular = function() {
// angular.bootstrap(document, ['copayApp']);
// };
/* Cordova specific Init */
2014-11-25 15:09:36 -03:00
if (window.cordova !== undefined) {
2014-11-25 15:09:36 -03:00
document.addEventListener('deviceready', function() {
document.addEventListener('pause', function() {
2014-12-12 19:17:50 -03:00
if (!window.ignoreMobilePause) {
window.location = '#!/signout';
2014-12-12 15:07:48 -03:00
}
}, false);
document.addEventListener('backbutton', function() {
window.location = '#!/homeWallet';
}, false);
document.addEventListener("menubutton", function() {
window.location = '#!/more';
}, false);
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;
2015-01-03 13:59:18 -03:00
// startAngular();
}, false);
2014-11-25 15:09:36 -03:00
} else {
2015-01-03 13:59:18 -03:00
// startAngular();
2014-11-25 15:09:36 -03:00
}
2014-03-14 17:38:27 -03:00
});