Redirect YouTube Shorts to Watch

Redirect /shorts to /watch

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
𝖢𝖸 𝖥𝗎𝗇𝗀
1日のインストール数
0
累計インストール数
224
評価
0 1 0
バージョン
0.1.3
作成日
2023/06/10
更新日
2023/06/16
ライセンス
MIT
対象サイト

Redirect YouTube Shorts to Watch

development request #187353

Description

The Redirect YouTube Shorts to Watch userscript is a tool designed to automatically redirect URLs with the "/shorts" path on YouTube to the corresponding "/watch" page. This userscript is intended to enhance the user experience by ensuring that when a user visits a YouTube Shorts video, they are automatically redirected to the standard video watch page.

How it Works

The userscript utilizes the popular browser extension Tampermonkey to run custom JavaScript code whenever a YouTube page is loaded. The code checks the URL of the page and detects if it contains the "/shorts" path. If a "/shorts" path is found, the userscript extracts the video ID from the URL and redirects the user to the corresponding "/watch?v=" URL.

The userscript listens for various events triggered during page navigation and updates, ensuring that the redirection functionality remains active and reacts to changes in the URL. It utilizes event listeners for events such as "yt-navigate," "yt-navigate-start," "yt-page-data-fetched," "yt-page-data-updated," and "yt-navigate-finish" to continuously monitor the page and perform the necessary redirection when required.

By automatically redirecting YouTube Shorts URLs to the watch page, this userscript eliminates the need for users to manually change the URL or search for the video they want to watch. It provides a seamless and efficient browsing experience for users who prefer to watch YouTube videos on the standard watch page rather than the Shorts format.

Please note that this userscript requires a browser extension like Tampermonkey to be installed and enabled in your browser. The installation process may vary depending on your browser and extension manager.