您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Highlights weekend events on play.limitlesstcg.com
当前为
// ==UserScript== // @name Highlight Playable Events on Limitless TCG // @namespace http://www.example.com // @version 1.0 // @description Highlights weekend events on play.limitlesstcg.com // @author Joe Zhu // @match https://play.limitlesstcg.com/tournaments/upcoming* // @grant none // @license joezhuu // ==/UserScript== (function() { 'use strict'; // Function to check if a date falls on a weekend (Saturday or Sunday) function isSuitable(date) { const day = date.getDay(); const hour = date.getHours(); // Sat or Sun is good if (day === 0 || day === 6) { // from 8am to 5pm if (hour >= 8 && hour <= 17) { return true; } } return false; } // Get the event table const eventTable = document.querySelector('table.striped.upcoming-tournaments'); // Update this selector if needed // Get all the event rows const eventRows = eventTable.querySelectorAll('tr[data-date]'); // Loop through each event row eventRows.forEach(row => { // Get the date of the event const dateString = row.getAttribute('data-date'); const eventDate = new Date(dateString); // Check if the event falls on a weekend if (isSuitable(eventDate)) { // Apply highlighting to the event row row.style.color = '#FF00CC'; } }); })();