bwc
This commit is contained in:
parent
04fb7ba032
commit
320de62f13
348 changed files with 7745 additions and 30874 deletions
68
src/js/init.js
Normal file
68
src/js/init.js
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
'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) {
|
||||
|
||||
// Fastclick event
|
||||
if ('addEventListener' in document) {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
FastClick.attach(document.body);
|
||||
}, false);
|
||||
}
|
||||
|
||||
document.addEventListener('deviceready', function() {
|
||||
|
||||
document.addEventListener('pause', function() {
|
||||
if (!window.ignoreMobilePause) {
|
||||
window.location = '#/';
|
||||
}
|
||||
}, false);
|
||||
|
||||
document.addEventListener('resume', function() {
|
||||
setTimeout(function() {
|
||||
window.ignoreMobilePause = false;
|
||||
}, 100);
|
||||
}, false);
|
||||
|
||||
document.addEventListener('backbutton', function() {
|
||||
window.location = '#/walletHome';
|
||||
}, false);
|
||||
|
||||
document.addEventListener('menubutton', function() {
|
||||
window.location = '#/preferences';
|
||||
}, false);
|
||||
|
||||
document.addEventListener('offline', function() {
|
||||
window.location = '#/network/offline';
|
||||
}, false);
|
||||
|
||||
document.addEventListener("online", function() {
|
||||
window.location = '#/network/online';
|
||||
}, 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;
|
||||
|
||||
// startAngular();
|
||||
}, false);
|
||||
} else {
|
||||
// startAngular();
|
||||
}
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue