2024-05-01 23:56:10 +03:00
|
|
|
window.onload = function() {
|
2024-05-02 17:48:27 +03:00
|
|
|
setTimeout(function () {
|
|
|
|
play("error");
|
|
|
|
}, 1000)
|
2024-05-02 15:12:39 +03:00
|
|
|
}
|
2024-05-01 23:56:10 +03:00
|
|
|
|
2024-05-02 20:40:24 +03:00
|
|
|
const getStyleProperty = (s, p) => getComputedStyle(s).getPropertyValue(p);
|
|
|
|
|
2024-05-02 15:12:39 +03:00
|
|
|
function play(audioId) {
|
|
|
|
let audioElement = document.getElementById(audioId);
|
2024-05-02 17:48:27 +03:00
|
|
|
audioElement.play();
|
2024-05-02 15:12:39 +03:00
|
|
|
}
|
2024-05-01 23:56:10 +03:00
|
|
|
|
2024-05-02 15:12:39 +03:00
|
|
|
function close_button(href) {
|
2024-05-01 23:56:10 +03:00
|
|
|
play("click");
|
|
|
|
window.location.href = href;
|
2024-05-02 15:12:39 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
function details_button() {
|
|
|
|
play("click");
|
2024-05-02 20:40:24 +03:00
|
|
|
|
|
|
|
document.getElementById('dialog-content').style.display = 'none';
|
|
|
|
let root = document.documentElement;
|
|
|
|
let dialogElement = document.getElementById('dialog');
|
|
|
|
dialogElement.animate([
|
|
|
|
{
|
|
|
|
opacity: 0,
|
|
|
|
width: getStyleProperty(root, '--keyframe-hide-dialog-width'),
|
|
|
|
height: getStyleProperty(root, '--keyframe-hide-dialog-height'),
|
|
|
|
}
|
|
|
|
], {
|
|
|
|
fill: 'forwards',
|
|
|
|
easing: 'ease-out',
|
|
|
|
duration: 250
|
|
|
|
});
|
|
|
|
dialogElement.style.display = 'none';
|
|
|
|
|
|
|
|
let detailsElement = document.getElementById('details');
|
|
|
|
detailsElement.style.display = 'inline-block';
|
|
|
|
detailsElement.animate([
|
|
|
|
{
|
|
|
|
opacity: 0, offset: 0.95
|
|
|
|
},
|
|
|
|
{
|
|
|
|
opacity: 1
|
|
|
|
}
|
|
|
|
], {
|
|
|
|
fill: 'forwards',
|
|
|
|
easing: 'ease-out',
|
|
|
|
duration: 1000
|
|
|
|
})
|
2024-05-02 15:12:39 +03:00
|
|
|
}
|