Redirect YouTube Shorts to Watch

Redirect /shorts to /watch

当前为 2023-06-10 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
𝖢𝖸 𝖥𝗎𝗇𝗀
评分
0 0 0
版本
0.1.0
创建于
2023-06-10
更新于
2023-06-10
大小
1.5 KB
许可证
MIT
适用于

The **Redirect YouTube Shorts to Watch** userscript is a script that can be installed in the web browser extension called Tampermonkey. This userscript is designed to redirect URLs containing "/shorts" on YouTube to the regular watch page.

Once installed, the userscript runs in the background and automatically detects when a YouTube page is loaded. It monitors the URL and checks if the pathname contains "/shorts". If it does, the userscript extracts the video ID from the URL and redirects the page to the regular watch page by replacing "/shorts" with "/watch?v=" and appending the extracted video ID.

The userscript continuously monitors the page for any changes in the URL or page content, ensuring that even if the user navigates within YouTube or the page dynamically updates, the redirection is still applied. This is achieved through event listeners that capture various events such as page navigation, data fetching, and page updates.

By redirecting YouTube Shorts URLs to the watch page, this userscript enables a seamless viewing experience for users who prefer to watch shorts in the regular format. It simplifies the process of accessing and interacting with shorts content on YouTube, providing a more consistent and familiar interface for users.