保护猫粮,从我做起
// ==UserScript==
// @name 猫站自动隐藏置顶免费
// @namespace http://tampermonkey.net/
// @version 0.2
// @description 保护猫粮,从我做起
// @author Adonis142857
// @license MIT
// @match https://pterclub.com/details.php?id=*
// @match https://pterclub.com/detailsgame.php?id=*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to hide elements based on text
function hideElementsByText(text) {
let elements = document.querySelectorAll('a'); // 假设文本位于锚点标记内
for(let i = 0; i < elements.length; i++) {
if(elements[i].textContent.includes(text)) {
elements[i].style.display = 'none';
}
}
}
// Hide elements
hideElementsByText("帖子置顶1天 (将扣除 20,000 克猫粮)");
hideElementsByText("帖子置顶和免费1天 (将扣除 25,000 克猫粮)");
})();