Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function getMobileOperatingSystem() {
- var userAgent = navigator.userAgent || navigator.vendor || window.opera;
- if (/windows phone/i.test(userAgent)) return "Windows Phone";
- if (/android/i.test(userAgent)) return "Android";
- if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) return "iOS";
- return "unknown";
- }
- function getParams(url) {
- var params = {};
- var parser = document.createElement('a');
- parser.href = url;
- var query = parser.search.substring(1);
- var vars = query.split('&');
- for (var i = 0; i < vars.length; i++) {
- var pair = vars[i].split('=');
- params[pair[0]] = decodeURIComponent(pair[1]);
- }
- return params;
- };
- window.onload = function () {
- var params = getParams(window.location.href);
- var phone = getMobileOperatingSystem();
- var location = params.origin
- if ( phone === "Android" ) location = "intent://clic.com/confirmRegistration?verifyCode="+params.verifyCode+"#Intent;scheme=clicwallet;package=com.clictechnology.pay;end"
- if ( phone === "iOS" ) location = "clicwallet://clic.com/confirmRegistration??verifyCode="+params.verifyCode
- window.location = location
- setTimeout(function () {
- if (phone === "Android") return window.location = "https://play.google.com/store/apps/details?id=com.clictechnology.pay";
- else return window.location = "https://itunes.apple.com/us/app/clic-wallet/id1457362236";
- }, 1000);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement