var myTimer = setTimeout(function () {
hlt1 -= atk2;
hlt2 -= atk1;
console.log(hlt1, hlt2)
if (hlt1 <= 0 || hlt2 <= 0) {
clearTimeout(myTimer) // удаление таймера
}
}, 1000);
function getRandomIntInRange(min, max) {
return Math.floor(Math.random() * (max + 1 - min) + min);
}
function playRandom() {
var rnd = getRandomIntInRange(1, 3)
document.getElementById('sound-' + rnd).play();
}
switch(window.location.pathname) {
case "/gworld/":
document.getElementById("uzconv").className += " tab-active";
break;
case "/techno/":
default:
document.getElementById("allnews").className += " tab-active";
}