mirror of
https://github.com/darksaid98/Finger-Print-Hacking-Game.git
synced 2026-12-02 22:17:02 +00:00
34 lines
703 B
JavaScript
34 lines
703 B
JavaScript
$('document').ready(function(){
|
|
$gif = $('img').first();
|
|
});
|
|
|
|
window.addEventListener("message", (event) => {
|
|
if (event.data.type === "intro") {
|
|
intro();
|
|
} else if (event.data.type === "success") {
|
|
success();
|
|
} else if (event.data.type == "fail") {
|
|
fail();
|
|
}
|
|
});
|
|
|
|
function intro() {
|
|
$gif.attr("src", "intro.gif");
|
|
setTimeout(function() {
|
|
$gif.attr('src', "blank.png");
|
|
}, 3500)
|
|
};
|
|
|
|
function success() {
|
|
$gif.attr("src", "success.gif");
|
|
setTimeout(function() {
|
|
$gif.attr('src', "blank.png");
|
|
}, 3000)
|
|
};
|
|
|
|
function fail() {
|
|
$gif.attr("src", "fail.gif");
|
|
setTimeout(function() {
|
|
$gif.attr('src', "blank.png");
|
|
}, 3000)
|
|
}; |