some gremlin keeps deleting my code so imma push now

This commit is contained in:
Lazy Hippopotamus
2024-04-09 13:19:33 -04:00
parent 476d9c59be
commit d6b6f08ebe
28 changed files with 193 additions and 54 deletions

View File

@@ -10,4 +10,12 @@ if (localStorage.refered) {
document.getElementById("shape").scrollIntoView({
"behavior": "smooth"
});
}
}
Array.from(document.getElementsByClassName("ytframe")).forEach(frame => { // resizes youtube videos to fit their containers
var w1 = frame.getBoundingClientRect().width;
frame.width = "100%";
var w2 = frame.getBoundingClientRect().width;
frame.width = w2 + "px";
frame.height = frame.getBoundingClientRect().height * w2 / w1;
});