Free javascript Hosting


ncore-spooky.js

Uploaded on Oct 31 2021 01:49 by ftamas88

$(document).ready(function() {
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkUDgzzXaXn98Z0oi9ILU5mBjFANmRwlVJ3/6jYDAmxaiDG3/6xjQQCCKkRb/6kg/w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vvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");
function h(i, a) {
return Math.floor(Math.random() * (a - i + 1)) + i
}
function d(m) {
clearInterval(j);
var l = $("#spo0kyD");
l.fadeTo("fast", 1);
var i = parseInt(l.css("top").replace("px", ""))
, o = parseInt(l.css("left").replace("px", ""));
o + 195 > $(window).width() && (o = $(window).width() - 195),
i + 120 > $(window).height() && (i = $(window).height() - 120),
l.css({
width: "175px",
top: i + "px",
left: o + "px"
}),
l.addClass("ape-popup"),
l.html(m + '<br /><p class="list_alert" id="removeMessage" style="cursor:pointer;">bezár</p>'),
c = setInterval("$('#spo0kyD').fadeOut('slow', function(){$('#spo0kyD').remove()});", 30000)
}
function b() {
clearInterval(j),
clearInterval(c),
$("#spo0kyD").length > 0 && $("#spo0kyD").remove(),
"undefined" != typeof k && k.length > 0 && k.modal("hide")
}
var j, k, g, c;
$(document).on("click", "#removeMessage", function(i) {
// if (void 0 === i.originalEvent) {
// return alert("Kérlek te kattints ne egy kód."),
// !1
// }
var a = $("#spo0kyD");
a.fadeOut("slow"),
a.remove(),
clearInterval(c)
}),
$(document).on("click", "#spo0kyD > img", function(i) {
// if (void 0 === i.originalEvent) {
// return alert("Kérlek te kattints ne egy kód."),
// !1
// }
if ("true" === $("#spo0kyD").attr("data-recaptcha")) {
k = $("#spookymodal").clone(!0).attr("id", ""),
k.find(".modal-title").html("Captcha challenge"),
k.find(".modal-footer").remove(),
k.find(".modal-body").html('<div id="recaptcha"></div><br /><button class="anyanswer">Mehet</button>'),
$(document.body).append(k),
k.modal(),
g = grecaptcha.ready(function() {
grecaptcha.execute('6LeGT8AUAAAAAEZXWudAtmZaSDcuEzQmC3VRhq7p', {
action: 'spooky'
}).then(function(token) {});
}),
clearInterval(j),
$("#spo0kyD").stop(!0)
} else {
var a = {
eventid: $("#spo0kyD").attr("data-uuid"),
userid: $("#confg").attr("data-uid")
};
f.send(JSON.stringify(a))
}
}),
$(document).on("click", ".anyanswer", function(m) {
// if (void 0 === m.originalEvent) {
// return alert("Kérlek kattints te."),
// !1
// }
var l = null;
if ("undefined" == typeof $(".g-recaptcha-response").val()) {
return m.preventDefault(),
!1
}
l = $(".g-recaptcha-response").val();
var i = {
recaptcha: l,
eventid: $("#spo0kyD").attr("data-uuid"),
userid: $("#confg").attr("data-uid")
};
f.send(JSON.stringify(i))
}),
$(document).on("hidden.bs.modal", function() {
k.remove()
});
var f = new WebSocket("wss://spooky.ncore.pro:3001/spooky");
f.onopen = function() {
b()
}
,
f.onmessage = function(m) {
var x = JSON.parse(m.data);
switch (x.type) {
case "spooky":
b();
snd.play();
var q = 100
, r = 100
, a = 10
, e = $(window).width() - q - 10
, w = 10
, o = $(window).height() - r - 10
, t = Math.floor(Math.random() * (parseFloat(e) - parseFloat(a) + 1)) + parseFloat(a)
, n = Math.floor(Math.random() * (parseFloat(o) - parseFloat(w) + 1)) + parseFloat(w);
$("body").append('<div id="spo0kyD" data-uuid="' + x.eventid + '" data-recaptcha="' + x.recaptcha + '" style="z-index:1000;position:fixed;left:' + t + "px;width:" + q + "px;top:" + n + 'px;"><img style="cursor:pointer;" src="https://nc-img.cdn.l7cache.com/spooky2k21/sp2021-' + h(1, 45) + '.png" /></div>'),
j = setInterval("$('#spo0kyD').fadeOut('slow', function(){$('#spo0kyD').remove()});", 30000);


var randomnumber = Math.floor(Math.random() * (12000 - 1500 + 1)) + 1500;

////////////// RANDOM TIME /////////////////
setTimeout(function(){

if ("true" === $("#spo0kyD").attr("data-recaptcha")) {

///////////////////////////////////////////////////
snd.play();
///////////////////////////////////////////////////

k = $("#spookymodal").clone(!0).attr("id", ""),
k.find(".modal-title").html("Captcha challenge"),
k.find(".modal-footer").remove(),
k.find(".modal-body").html('<div id="recaptcha"></div><br /><button class="anyanswer">Mehet</button>'),
$(document.body).append(k),
k.modal(),
g = grecaptcha.ready(function() {
grecaptcha.execute('6LeGT8AUAAAAAEZXWudAtmZaSDcuEzQmC3VRhq7p', {
action: 'spooky'
}).then(function(token) {});
}),
clearInterval(j),
$("#spo0kyD").stop(!0)
snd.play();
setTimeout(function(){snd.play();},500);
setTimeout(function(){snd.play();},1000);
setTimeout(function(){snd.play();},1500);
} else {
var a = {
eventid: $("#spo0kyD").attr("data-uuid"),
userid: $("#confg").attr("data-uid")
};
f.send(JSON.stringify(a))
snd.play();

setTimeout(function(){snd.play();},500);
}

},randomnumber);






break;
case "spooky-event":
"undefined" != typeof k && k.modal("hide"),
x.success ? d(x.text) : b(),
"undefined" != typeof g && grecaptcha.reset(g)
}
}
});

Back to list