mirror of https://github.com/BTCPrivate/copay.git
remove unused webintents
This commit is contained in:
parent
1ebe7f95d2
commit
03e5d1d10c
|
@ -79,9 +79,6 @@ if [ ! -d $PROJECT ]; then
|
||||||
|
|
||||||
echo "${OpenColor}${Green}* Installing plugins... ${CloseColor}"
|
echo "${OpenColor}${Green}* Installing plugins... ${CloseColor}"
|
||||||
|
|
||||||
cordova plugin add https://github.com/florentvaldelievre/virtualartifacts-webIntent.git
|
|
||||||
checkOK
|
|
||||||
|
|
||||||
if [ $CURRENT_OS == "IOS" ]
|
if [ $CURRENT_OS == "IOS" ]
|
||||||
then
|
then
|
||||||
cordova plugin add https://github.com/tjwoon/csZBar.git
|
cordova plugin add https://github.com/tjwoon/csZBar.git
|
||||||
|
|
|
@ -9,13 +9,21 @@ angular.element(document).ready(function() {
|
||||||
|
|
||||||
var handleBitcoinURI = function(url) {
|
var handleBitcoinURI = function(url) {
|
||||||
if (!url) return;
|
if (!url) return;
|
||||||
if (url.indexOf('glidera') != -1) {
|
console.log('Custom URL:' + url); //TODO
|
||||||
url = '#/uri-glidera' + url.replace('copay://glidera', '');
|
|
||||||
} else if (url.indexOf('coinbase') != -1) {
|
var glidera = 'copay://glidera';
|
||||||
url = '#/uri-coinbase' + url.replace('copay://coinbase', '');
|
var coinbase = 'copay://coinbase';
|
||||||
} else {
|
|
||||||
|
if (url.indexOf('bitcoin:') == 0) {
|
||||||
url = '#/uri-payment/' + url;
|
url = '#/uri-payment/' + url;
|
||||||
}
|
} else if (url.indexOf(glidera) != -1) {
|
||||||
|
url = '#/uri-glidera' + url.replace(glidera, '');
|
||||||
|
} else if (url.indexOf(coinbase) != -1) {
|
||||||
|
url = '#/uri-coinbase' + url.replace(coinbase, '');
|
||||||
|
} else {
|
||||||
|
console.log('Unknown URL!')
|
||||||
|
};
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
window.location = url;
|
window.location = url;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -26,19 +34,13 @@ angular.element(document).ready(function() {
|
||||||
if (window.cordova !== undefined) {
|
if (window.cordova !== undefined) {
|
||||||
|
|
||||||
document.addEventListener('deviceready', function() {
|
document.addEventListener('deviceready', function() {
|
||||||
|
|
||||||
window.plugins.webintent.getUri(handleBitcoinURI);
|
|
||||||
window.plugins.webintent.onNewIntent(handleBitcoinURI);
|
|
||||||
window.handleOpenURL = handleBitcoinURI;
|
window.handleOpenURL = handleBitcoinURI;
|
||||||
|
|
||||||
startAngular();
|
startAngular();
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
window.handleOpenURL = handleBitcoinURI;
|
window.handleOpenURL = handleBitcoinURI;
|
||||||
window.plugins.webintent.getUri(handleBitcoinURI);
|
|
||||||
window.plugins.webintent.onNewIntent(handleBitcoinURI);
|
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
startAngular();
|
startAngular();
|
||||||
|
|
Loading…
Reference in New Issue