YouTube Restore "Show More" Button

Restores the "Show More" button on old youtube

目前為 2020-06-05 提交的版本,檢視 最新版本

// ==UserScript==
// @name        YouTube Restore "Show More" Button
// @description Restores the "Show More" button on old youtube
// @namespace   http://www.youtube.com/
// @include     http://www.youtube.com/watch?*
// @include     https://www.youtube.com/watch?*
// @version     1.3
// @grant       none
// ==/UserScript==


//I'm not a coder/scripter. I'm sure there's a much better way of doing this, but I couldn't figure it out.

function restoreDetailButtons() {
  if(document.getElementsByClassName('yt-uix-gen204').length == 0) {
    console.log('Restoring "Show More" Button');
    var showMoreButton = ('<button class="yt-uix-button yt-uix-button-size-default yt-uix-button-expander yt-uix-expander-head yt-uix-expander-collapsed-body yt-uix-gen204" type="button" onclick=";return false;" data-gen204="feature=watch-show-more-metadata"><span class="yt-uix-button-content">Show more</span></button>');
    var showLessButton = ('<button class="yt-uix-button yt-uix-button-size-default yt-uix-button-expander yt-uix-expander-head yt-uix-expander-body" type="button" onclick=";return false;"><span class="yt-uix-button-content">Show less</span></button>');
    
    document.getElementById("action-panel-details").insertAdjacentHTML('beforeend', showMoreButton + showLessButton);
  }
}

restoreDetailButtons();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址