您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Highlights YouTube videos in YouTube Studio that are not monetized (yellow/red icons).
// ==UserScript== // @name YouTube Studio - Highlight Non-Monetized Videos // @namespace https://greasyfork.org/en/users/yourusername // @version 1.0 // @description Highlights YouTube videos in YouTube Studio that are not monetized (yellow/red icons). // @author ChatGPT // @match https://studio.youtube.com/channel/*/videos // @grant none // @run-at document-idle // ==/UserScript== (function () { 'use strict'; const observer = new MutationObserver(() => { highlightUnmonetized(); }); const highlightUnmonetized = () => { const rows = document.querySelectorAll('ytcp-video-list-cell-monetization-status'); rows.forEach(row => { const icon = row.querySelector('iron-icon'); if (icon && icon.getAttribute('icon')) { const monetizationIcon = icon.getAttribute('icon'); const parentRow = row.closest('ytcp-video-row'); if (monetizationIcon.includes('monetization_off') || monetizationIcon.includes('monetization_limited')) { if (parentRow) { parentRow.style.backgroundColor = '#ffe5e5'; // light red parentRow.style.border = '2px solid red'; } } } }); }; const waitForTable = () => { const container = document.querySelector('ytcp-video-table'); if (container) { observer.observe(container, { childList: true, subtree: true }); highlightUnmonetized(); } else { setTimeout(waitForTable, 1000); } }; waitForTable(); })();