-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyt-ambiance.js
1 lines (1 loc) · 865 Bytes
/
yt-ambiance.js
1
javascript:krazete:var fograf;!function(){var i,n=document.getElementById("videofog");function o(){var e=document.querySelector("ytd-watch-flexy video")||document.querySelector("video"),t=e.getBoundingClientRect();n.width=t.width/8,n.height=t.height/8,n.style.width=t.width+"px",n.style.height=t.height+"px",i.drawImage(e,0,0,n.width,n.height),fograf=requestAnimationFrame(o)}n?(n.remove(),cancelAnimationFrame(fograf)):((n=document.createElement(%22canvas%22)).id=%22videofog%22,n.style.position=%22absolute%22,n.style.left=%2250%25%22,n.style.transform=%22translate(-50%25)%22,n.style.filter=%22blur(100px)%20contrast(1.5)%22,n.style.mixBlendMode=%22lighten%22,i=n.getContext(%222d%22),function%20t(){try{var%20e=document.querySelector(%22ytd-watch-flexy%20ytd-player%20#container%22);e.insertBefore(n,e.firstChild),o()}catch(e){requestAnimationFrame(t)}}())}();