您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fixes watch action buttons to be like how they used to be!
当前为
// ==UserScript== // @name Action Buttons Fix (modified) // @version 1.0.0 // @description Fixes watch action buttons to be like how they used to be! // @author xX_LegendCraftd_Xx // @icon https://www.youtube.com/favicon.ico // @namespace https://gf.zukizuki.org/en/users/933798 // @license MIT // @match https://*.youtube.com/* // @grant none // @run-at document-start // ==/UserScript== const abtnconfig = { unsegmentLikeButton: false, noFlexibleItems: true }; function updateBtns() { var watchFlexy = document.querySelector("ytd-watch-flexy"); var results = watchFlexy.data.contents.twoColumnWatchNextResults.results.results.contents; for (var i = 0; i < results.length; i++) { if (results[i].videoPrimaryInfoRenderer) { var actions = results[i].videoPrimaryInfoRenderer.videoActions.menuRenderer; if (abtnconfig.unsegmentLikeButton) { if (actions.topLevelButtons[0].segmentedLikeDislikeButtonRenderer) { var segmented = actions.topLevelButtons[0].segmentedLikeDislikeButtonRenderer; actions.topLevelButtons.splice(0, 1); actions.topLevelButtons.unshift(segmented.dislikeButton); actions.topLevelButtons.unshift(segmented.likeButton); } } if (abtnconfig.noFlexibleItems) { for (var i = 0; i < actions.flexibleItems.length; i++) { actions.topLevelButtons.push(actions.flexibleItems[i].menuFlexibleItemRenderer.topLevelButton); } delete actions.flexibleItems } } } var temp = watchFlexy.data; watchFlexy.data = {}; watchFlexy.data = temp; } document.addEventListener("yt-page-data-updated", (e) => { if (e.detail.pageType == "watch") { updateBtns(); } }); (function() { ApplyCSS(); function ApplyCSS() { var styles = document.createElement("style"); styles.innerHTML=` ytd-watch-metadata[modern-metapanel-order] #actions.ytd-watch-metadata { min-width: auto !important; }` document.head.appendChild(styles); } })();