🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Redirect YouTube Shorts to Watch

Redirect /shorts to /watch

Você precisará instalar uma extensão como Tampermonkey, Greasemonkey ou Violentmonkey para instalar este script.

You will need to install an extension such as Tampermonkey to install this script.

Você precisará instalar uma extensão como Tampermonkey ou Violentmonkey para instalar este script.

Você precisará instalar uma extensão como Tampermonkey ou Userscripts para instalar este script.

Você precisará instalar uma extensão como o Tampermonkey para instalar este script.

Você precisará instalar um gerenciador de scripts de usuário para instalar este script.

(Eu já tenho um gerenciador de scripts de usuário, me deixe instalá-lo!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

(Eu já possuo um gerenciador de estilos de usuário, me deixar fazer a instalação!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Autor
𝖢𝖸 𝖥𝗎𝗇𝗀
Instalações hoje
1
Total de instalações
270
Avaliações
0 1 0
Versão
0.1.3
Criado
10/06/2023
Atualizado
16/06/2023
Tamanho
2,15 KB
Licença
MIT
Aplicável a

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.