Bring back YouTube Fullscreen Scroll

Removes the deprecate-fullerscreen-ui attribute from YouTube elements.

目前為 2025-08-30 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name                          Bring back YouTube Fullscreen Scroll
// @name:fr                       Restaurer le défilement en plein écran YouTube
// @name:es                       Restaurar el desplazamiento en pantalla completa de YouTube
// @name:de                       YouTube-Vollbild-Scrollen wiederherstellen
// @name:it                       Ripristina lo scorrimento a schermo intero di YouTube
// @name:zh-CN                    恢复 YouTube 全屏滚动
// @namespace                     https://gist.github.com/4lrick/1060be71b57d6b6923c461223d077b13
// @version                       1.0
// @description                   Removes the deprecate-fullerscreen-ui attribute from YouTube elements.
// @description:fr                Supprime l’attribut deprecate-fullerscreen-ui des éléments YouTube.
// @description:es                Elimina el atributo deprecate-fullerscreen-ui de los elementos de YouTube.
// @description:de                Entfernt das Attribut deprecate-fullerscreen-ui von YouTube-Elementen.
// @description:it                Rimuove l’attributo deprecate-fullerscreen-ui dagli elementi di YouTube.
// @description:zh-CN             移除 YouTube 元素中的 deprecate-fullerscreen-ui 属性。
// @author                        4lrick
// @match                         https://www.youtube.com/*
// @icon                          https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant                         none
// @license                       MIT
// ==/UserScript==

(function() {
    'use strict';

    const attributeName = 'deprecate-fullerscreen-ui';

    function removeAttribute() {
        const elements = document.querySelectorAll(`[${attributeName}]`);
        elements.forEach(element => {
            element.removeAttribute(attributeName);
        });
    }

    const observer = new MutationObserver(removeAttribute);
    observer.observe(document.body, { childList: true, subtree: true, attributeFilter: [attributeName] });
})();