Skip to content

Instantly share code, notes, and snippets.

@miyaoka
Last active March 8, 2023 05:24
Show Gist options
  • Save miyaoka/6db02cf0555a29f2f9a785d5d96bca30 to your computer and use it in GitHub Desktop.
Save miyaoka/6db02cf0555a29f2f9a785d5d96bca30 to your computer and use it in GitHub Desktop.
consoleに貼り付けて実行
// bgm
var p=document.createElement("div");p.id="player",document.body.appendChild(p);var s=document.createElement("script");function onYouTubeIframeAPIReady(){new YT.Player("player",{height:"0",width:"0",videoId:"OiGhqVxfWIc",events:{onReady:e=>e.target.playVideo()}})}s.src="https://www.youtube.com/iframe_api",document.body.appendChild(s);
// https://twitter.com/uhyo_/status/1633310922054807553
document.head.insertAdjacentHTML("beforeend", "<style>::view-transition-old(root),::view-transition-new(root) {animation: none; mix-blend-mode: normal}</style>");
setInterval(()=>document.startViewTransition(()=>{}).ready.then(() => {
document.documentElement.animate({ scale: [1, 1.2], opacity: [1, 0]}, {duration: 100, pseudoElement: "::view-transition-new(root)"})
}), 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment