<!--NOLIM--><!--NLM138--><!--settings{"addFile":[{"mp3":"https://310401.selcdn.ru/links/Zvuk_-_vinil.mp3","playsound":"#odinstart","stopsound":"#odinstop"}],"startOver":"0","volumeIncrease":"volumePlus138","volumeDecrease":"volumeMinus138","volumeStart":"10","soundStep":"5"}settingsend--><!--ts1741608362143ts--> <audio id="#odinstartaudio"><source src='https://310401.selcdn.ru/links/Zvuk_-_vinil.mp3'></audio> <script> $(document).ready(function () { function changeDisplay(attribute,display='') { $(`a[href^='${attribute}']`).each(function() { if (display == "none") { $(this).parents(".tn-elem").addClass("nolimAutoScaleFix"); } else { $(this).parents(".tn-elem").removeClass("nolimAutoScaleFix"); } }); } changeDisplay('#odinstop','none'); $("audio").each(function() { $(this)[0].volume = 0.1; }); if ($("a[href^='#odinstart']").length > 0) { $("a[href^='#odinstart']").addClass("odinstartplaybtnbg0"); }; if($("a[href^='#odinstop']").length > 0) { $("a[href^='#odinstop']").addClass("odinstopstopbtnbg0").addClass("nolimAutoScaleFix"); }; if($("a[href^='#odinstart']").length > 0 ) { $("a[href^='#odinstart']").click(function (e) { e.preventDefault(); const soundMax = document.getElementById("#odinstartaudio"); $("audio").not(soundMax).each(function () { $(this).trigger("pause"); }); let soundDuration; if(soundMax) { soundDuration = soundMax.duration; } const int = setInterval(function() { if (soundMax.currentTime === soundDuration) { clearInterval(int); changeDisplay('#odinstop', 'none'); changeDisplay('#odinstart',''); } }, 1000); if(0) { soundMax.currentTime = 0; }; soundMax.play(); $('a[class*=playbtnbg]').each(function() { $(this).parents(".tn-elem").removeClass("nolimAutoScaleFix"); }); $('a[class*=stopbtnbg]').each(function() { var classes = $(this).attr('class'); if (classes.indexOf('.odinstopstopbtnbg0') === -1) { $("a[href^='#odinstart']").addClass("nolimAutoScaleFix"); } }); $("a[href^='#odinstart']").each(function() { $(this).parents(".tn-elem").addClass("nolimAutoScaleFix"); }); $(".odinstopstopbtnbg0").removeClass("nolimAutoScaleFix"); $(".odinstopstopbtnbg0").parents(".tn-elem").each(function() { this.classList.remove("nolimAutoScaleFix"); }); let elementsStop = document.querySelectorAll('[class*=stopbtnbg]'); let elementsStart = document.querySelectorAll('[class*=playbtnbg]'); [elementsStop, elementsStart].forEach(elements => { elements.forEach(e => { if (!e.className.includes('odinstopstopbtnbg0')) { if (elements === elementsStop) { e.classList.add("nolimAutoScaleFix"); } else { e.classList.remove("nolimAutoScaleFix"); } } }); }); }); }; if($("a[href^='#odinstop']").length > 0) { $("a[href^='#odinstop']").click(function (e) { e.preventDefault(); const soundMax = document.getElementById("#odinstartaudio"); soundMax.pause(); changeDisplay('#odinstart',''); $(this).parents(".tn-elem").addClass("nolimAutoScaleFix"); $(".odinstartplaybtnbg0").removeClass("nolimAutoScaleFix"); $(".odinstartplaybtnbg0").parents(".tn-elem")[0].classList.remove("nolimAutoScaleFix"); }); } ; function increaseVolume() { $("audio").each(function() { const maxVolume = 1 - 0.05; if (!this.paused && $(this)[0].volume < maxVolume) { $(this)[0].volume += 0.05; } }); } function decreaseVolume() { $("audio").each(function() { const minVolume = 0.060000000000000005; if (!this.paused && $(this)[0].volume > minVolume) { $(this)[0].volume -= 0.05; } }); } let intForVolumeIncrease = setInterval(() => { const volumeIncrease = $('.volumePlus138'); if(volumeIncrease) { clearInterval(intForVolumeIncrease); volumeIncrease.click(function() { increaseVolume(); }); } },100); setTimeout(() => { if(intForVolumeIncrease) { clearInterval(intForVolumeIncrease); } },5000); let intForVolumeDecrease = setInterval(() => { const volumeDecrease = $('.volumeMinus138'); if(volumeDecrease) { clearInterval(intForVolumeDecrease); volumeDecrease.click(function() { decreaseVolume(); }); } },100); setTimeout(() => { if(intForVolumeDecrease) { clearInterval(intForVolumeDecrease); } },5000); }); </script> <style> .nolimAutoScaleFix { opacity: 0!important; height: 0!important; max-height: 0!important; min-height: 0!important; pointer-events: none!important; overflow: hidden!important; padding-top: 0!important; padding-bottom: 0!important; position: absolute; bottom: -100000px; } </style>