您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace relative time with actual date from title attribute on coomer.su / coomer.st
// ==UserScript== // @name Date Display Full Timestamp for coomer.su / coomer.st // @namespace http://tampermonkey.net/ // @version 1.0 // @description Replace relative time with actual date from title attribute on coomer.su / coomer.st // @match https://coomer.su/* // @match https://coomer.st/* // @grant none // @author Aligator // @license GNU GPLv3 // ==/UserScript== (function() { 'use strict'; function updateTimestamps() { document.querySelectorAll("time.timestamp").forEach(el => { const fullDate = el.getAttribute("title"); if (fullDate) { // Example fullDate: 2024-06-04T23:53:36 // Split into date and time const [datePart, timePart] = fullDate.split("T"); if (timePart) { const shortTime = timePart.slice(0,5); // HH:MM only const formatted = `${datePart} at ${shortTime}`; if (el.textContent !== formatted) { el.textContent = formatted; } } } }); } // Run once on page load updateTimestamps(); // Observe dynamic content (for infinite scroll / lazy loading) const observer = new MutationObserver(updateTimestamps); observer.observe(document.body, { childList: true, subtree: true }); })();