forked from BlueWallet/Website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
suggestion to replace text with a spinner 🔃
- 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
- Loading branch information
1 parent
5382e0c
commit a1bc281
Showing
1 changed file
with
53 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,64 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | ||
<title></title> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | ||
<noscript> | ||
<meta http-equiv="Refresh" content="0;URL=https://old.changelly.com/?ref_id=rtagfcvnwiwvhm99"/> | ||
</noscript> | ||
<style> | ||
.lds-dual-ring { | ||
display: block; | ||
width: 64px; | ||
height: 64px; | ||
margin: auto; | ||
} | ||
.lds-dual-ring:after { | ||
content: " "; | ||
display: block; | ||
width: 46px; | ||
height: 46px; | ||
margin: 1px; | ||
border-radius: 50%; | ||
border: 5px solid #CCDDF9; | ||
border-color: #CCDDF9 transparent #CCDDF9 transparent; | ||
animation: lds-dual-ring 1.2s linear infinite; | ||
} | ||
@keyframes lds-dual-ring { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div>country_code: <span id="country_code"></span></div> | ||
|
||
<a href="https://old.changelly.com/?ref_id=rtagfcvnwiwvhm99">Click here if you are not being redirected</a> | ||
<script> | ||
<div class="lds-dual-ring"></div> | ||
<script> | ||
var safello_countries = ["SE", "GB", "AD", "AT", "AX", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GG", "GI", "GR", "HR", "HU", "IE", "IM", "IS", "IT", "JE", "LI", "LT", "LU", "LV", "MC", "ME", "MT", "NL", "NO", "PL", "PT", "SI", "SK", "SM", "IC"]; | ||
var u = new URLSearchParams(window.location.search); | ||
var address = u.get('address') || ''; | ||
|
||
$.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 ) { | ||
$('#country_code').html(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'; | ||
} | ||
} | ||
}); | ||
</script> | ||
$.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'; | ||
} | ||
} | ||
}); | ||
</script> | ||
</body> | ||
</html> |