<!-- Инструкция в этом посте https://t.me/from_fedya/880 -->
<script>
let bodyColor = "#FFFFFF",
shapeClass = "hover-image",
eventType = "hover",
removeColor = false,
bodyTrasition = 0.4;
document.addEventListener("DOMContentLoaded",()=>{document.querySelector('head').insertAdjacentHTML("beforeend",`<style>body{transition:background-color ${bodyTrasition}s linear}.hover-image .tn-atom{transition:all 0.2s linear}</style>`);let allImage=document.querySelectorAll('.'+shapeClass);allImage.forEach((e)=>{let child=e.querySelector('.tn-atom'),bgColor=window.getComputedStyle(child).backgroundColor;if(eventType==="click"){e.addEventListener("click",()=>{document.body.style.backgroundColor=`${bgColor}`})}else{e.addEventListener("mouseenter",()=>{document.body.style.backgroundColor=`${bgColor}`});if(removeColor){e.addEventListener("mouseleave",()=>{document.body.style.backgroundColor=`${bodyColor}`})}}})});
</script>