您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Modify Boosty title with timestamp
当前为
// ==UserScript== // @name Boosty Title Modifier // @version 0.2 // @description Modify Boosty title with timestamp // @match https://boosty.to/* // @grant none // @namespace https://gf.qytechs.cn/users/789838 // ==/UserScript== (function() { 'use strict'; var appliedChange = false; // Функция для получения текста из элемента с классом, содержащим CreatedAt_headerLink_ function getTimestamp() { var timestampElement = document.querySelector('span[class*="CreatedAt_headerLink_"]'); if (timestampElement) { console.log("Timestamp element found:", timestampElement); return timestampElement.textContent.trim().replace(/ в /g, ' ').replace(/:/g, ' '); } else { console.log("Timestamp element not found."); } return ''; } // Функция для изменения заголовка страницы function modifyTitle() { var originalTitleElement = document.querySelector('h1[class*="Post_title_"]'); if (originalTitleElement) { console.log("Title element found:", originalTitleElement); var originalTitle = originalTitleElement.textContent.trim(); var timestamp = getTimestamp(); if (timestamp !== '') { document.title = timestamp + ' - ' + originalTitle; console.log("Title modified to:", document.title); appliedChange = true; } else { console.log("Timestamp is empty."); } } else { console.log("Title element not found."); } } // Проверка и вызов функции каждые 5 секунд до применения изменений var intervalId = setInterval(function() { if (!appliedChange) { modifyTitle(); } else { clearInterval(intervalId); } }, 5000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址