Last active
March 11, 2024 14:05
-
-
Save pundoo/7b429b4f299f40584ceea000ad5ece1a to your computer and use it in GitHub Desktop.
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
/// youtube-shorts-redirect.js | |
document.addEventListener('yt-navigate-finish', e => { | |
const pathName = window.location.pathname; | |
if (!/^\/shorts/.test(pathName)) return; | |
window.location.replace(`https://www.youtube.com/watch/?v=${pathName.match(/shorts\/(\w+)/)[1]}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment