Skip to content

Instantly share code, notes, and snippets.

@batkor
Created June 18, 2026 04:26
Show Gist options
  • Select an option

  • Save batkor/888ce67819c9983415683a0b1c68873a to your computer and use it in GitHub Desktop.

Select an option

Save batkor/888ce67819c9983415683a0b1c68873a to your computer and use it in GitHub Desktop.
Mirror video js
function mirror(el) {
el.style.transform = "scaleX(-1)";
}
document
.querySelectorAll('.shadow-root-container')
.forEach(function (el) {
el.shadowRoot
.querySelectorAll('video')
.forEach(vEl => mirror(vEl))
})
document
.querySelectorAll('video')
.forEach(vEl => mirror(vEl))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment