您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Track pet bloat status and modify and notify if your pet is already bloated to prevent over-feeding
当前为
// ==UserScript== // @name [GC] Overfeed Preventer // @namespace http://tampermonkey.net/ // @version 1.1 // @license MIT // @description Track pet bloat status and modify and notify if your pet is already bloated to prevent over-feeding // @author Heda // @match https://www.grundos.cafe/itemview/* // @match https://www.grundos.cafe/useobject/* // @grant none // ==/UserScript== (function() { 'use strict'; function getItemName() { let itemElement = [...document.querySelectorAll("div.flex-column.justify-center span")] .find(span => span.textContent.includes("Item")); return itemElement ? itemElement.textContent.replace("Item :", "").trim() : null; } function modifyPageForBloat() { if (localStorage.getItem("bloated") === "true" && localStorage.getItem("currentItem") !== "Bloatershroom") { document.querySelector("input#submit.form-control.flex-grow")?.remove(); let itemActionSelect = document.querySelector("select#itemaction_select"); if (itemActionSelect) { let alertDiv = document.createElement("div"); alertDiv.style.cssText = "background:red;color:white;font-weight:bold;padding:10px;text-align:center;cursor:pointer;margin-top:10px;border-radius:5px;width:100%;max-width:400px;margin:auto;"; alertDiv.innerHTML = "PET IS BLOATED <br> CLICK TO RESET IF THIS IS A MISTAKE"; alertDiv.onclick = () => { localStorage.setItem("bloated", "false"); alert("Bloat status reset."); location.reload(); }; itemActionSelect.parentElement.insertAdjacentElement('afterend', alertDiv); } } } if (window.location.href.startsWith("https://www.grundos.cafe/itemview/")) { let itemName = getItemName(); if (itemName) localStorage.setItem("currentItem", itemName); modifyPageForBloat(); } if (window.location.href.startsWith("https://www.grundos.cafe/useobject/")) { let bodyText = document.body.textContent; if (bodyText.includes("and now is bloated")) localStorage.setItem("bloated", "true"); else if (bodyText.includes("now is very full")) localStorage.setItem("bloated", "false"); } })();