您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove spoilers from Peacock Premier League video descriptions
// ==UserScript== // @name Peacock Premier League Spoiler Remover // @namespace peacock-premier-league-spoiler-remover // @version 0.1 // @description Remove spoilers from Peacock Premier League video descriptions // @author Jason Mitchell // @match https://www.peacocktv.com/watch/* // @copyright 2021+, pixelmaven.com // @license MIT // @icon https://www.google.com/s2/favicons?domain=peacocktv.com // ==/UserScript== setInterval(function(){ var videoTitles = document.getElementsByClassName( "playlist-item-overlay__container-title" ); if ( videoTitles.length > 0 ) { for( const t of videoTitles) { var rawTitle = t.innerHTML; // These also sometimes includes spoilers, so just replace with generic text if ( rawTitle.includes( "PL Update" ) ) { t.innerHTML = "Premier League Update"; } // Remove scores from descriptions if ( rawTitle.includes( "Extended highlights" ) ) { rawTitle = rawTitle.replace( /[0-9]/g, '' ); // Remove numbers (game scores) rawTitle = rawTitle.replace( ',', 'vs' ); t.innerHTML = rawTitle; } } // Remove description elements (even thought they are typically hidden) var videoDescriptions = document.getElementsByClassName( "playlist-item-overlay__container-description" ); while( videoDescriptions.length > 0 ) { videoDescriptions[0].parentNode.removeChild( videoDescriptions[0] ); } } }, 1000)