Last active
October 5, 2021 15:01
-
-
Save FunctionDJ/0add38f1830902f70824c9d1055f4ed5 to your computer and use it in GitHub Desktop.
YouTube 3/2 Aspect Ratio Toggler (No dependencies)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
let existing = document.querySelector("#ar") | |
if (existing) { | |
existing.remove() | |
} else { | |
let styleNode = document.createElement("style") | |
styleNode.id = "ar" | |
styleNode.type = "text/css" | |
styleNode.appendChild(document.createTextNode("video{transform:scaleX(calc((3/2) / (16/9)))}")) | |
document.head.appendChild(styleNode) | |
} | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
module: false, | |
format: { | |
wrap_iife: true, | |
preamble: "javascript:" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment