您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Annict の「記録するページ」で翌日以降の番組を非表示にします。
当前为
// ==UserScript== // @name Annict Hide Future Programs // @namespace https://tampermonkey.net/ // @version 0.1.1 // @description Annict の「記録するページ」で翌日以降の番組を非表示にします。 // @author SlashNephy <[email protected]> // @match https://annict.com/* // @license MIT license // @grant none // @icon https://www.google.com/s2/favicons?sz=64&domain=annict.com // ==/UserScript== const main = () => { if (!location.href.startsWith('https://annict.com/track')) { return; } for (const card of document.querySelectorAll('div.card.u-card-flat')) { const dateElement = card.querySelector('div.col div[class="small"] span.text-muted'); if (!dateElement?.textContent) { continue; } const datetime = Date.parse(dateElement.textContent); const today = Date.now(); if (datetime > today + 24 * 60 * 60 * 1000) { card.style.display = 'none'; } } }; main(); window.addEventListener('turbo:load', () => { main(); });