Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/* Youtube Video Flipper & Rotater This code is released under the CC0 1.0 Universal license. You can copy, modify, distribute and use it, even for commercial purposes, without asking for permission. https://creativecommons.org/publicdomain/zero/1.0/ The code is written to run on a Mac computer. On Windows, it calls the Start Menu. For use on Windows, see the appropriate comment in the code. */ let isMirrored = false; // Mirroring status let rotation = 0; // Current angle of rotation in degrees document.addEventListener('keydown', function(event) { const videos = document.querySelectorAll('video'); const shortvideo = document.querySelector('#reel-video-renderer') // ~: tükrözés if (event.key === '~') { if (isMirrored) { // Töröljük a tükrözést videos.forEach(video => { video.style.transform = ''; }); } else { // We mirror it horizontally videos.forEach(video => { video.style.transform = 'rotateY(180deg)'; }); } isMirrored = !isMirrored; // We reverse the situation } // Cmd-Alt-0: 90 fokkal elforgatás if (event.metaKey && event.altKey && event.key === '+') { // Replace event.metaKey to event.ctrlKey for Windows usage rotation = (rotation + 90); shortvideo.style.transform = `rotateZ(${rotation}deg)`; // We disable the default browser functionality if necessary event.preventDefault(); } if (event.metaKey && event.altKey && event.key === '-') { // Replace event.metaKey to event.ctrlKey for Windows usage rotation = (rotation - 90); shortvideo.style.transform = `rotateZ(${rotation}deg)`; // We disable the default browser functionality if necessary event.preventDefault(); } });
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)