From a1bc281290ea4ec036b5cfd42a36f8cc748aef48 Mon Sep 17 00:00:00 2001 From: Viacheslav Bakshaev Date: Fri, 26 Apr 2019 09:37:32 +0200 Subject: [PATCH] suggestion to replace text with a spinner :arrows_clockwise: - tabs converted to spaces with identation width 2 - added noscript redirect meta instead of the link - country_code falls to console.log now - added css spinner in bluewallet color --- buy-bitcoin-redirect.html | 78 ++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 25 deletions(-) diff --git a/buy-bitcoin-redirect.html b/buy-bitcoin-redirect.html index 0dff7bfc..7c267bc4 100644 --- a/buy-bitcoin-redirect.html +++ b/buy-bitcoin-redirect.html @@ -1,36 +1,64 @@ - - + + + + -
country_code:
- - Click here if you are not being redirected - + $.ajax({ + url: "https://geoip-db.com/jsonp", + jsonpCallback: "callback", + dataType: "jsonp", + error: function(){ + window.location = 'https://old.changelly.com/?ref_id=rtagfcvnwiwvhm99'; + }, + success: function( location ) { + console.log('country_code', location.country_code); + if (location.country_code == 'ZA' || location.country_code == 'ZAF' || location.country_code == 'ZAR') { + window.location = 'https://ice3x.com?ref=14342738'; + } else if (safello_countries.indexOf(location.country_code) !== -1) { + window.location = 'https://app.safello.com/sdk/quickbuy.html?appId=4904c769-8a1d-43ca-8bd0-896520c94fdf&country=' + location.country_code + '&theme=bluewallet&layout=app&address=' + address; + } else { + window.location = 'https://old.changelly.com/?ref_id=rtagfcvnwiwvhm99'; + } + } + }); +