您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes Oxygen not included hydrocactus from Oni Assistant Food Calculator
// ==UserScript== // @name Remove oni-assistant Hydrocactus // @namespace http://tampermonkey.net/ // @version 1.0 // @author PicardOrion // @license MIT // @description Removes Oxygen not included hydrocactus from Oni Assistant Food Calculator // @match https://oni-assistant.com/tools/foodcalculator // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; const plantDumpElement = document.getElementById("plantdump"); if (plantDumpElement) { // Parse the current content let n = JSON.parse(plantDumpElement.innerHTML); // Modify the array as needed const index = n.findIndex(item => item.Name === "Hydrocactus"); if (index !== -1) { n.splice(index, 1); // Remove Hydrocactus console.log("Removed Hydrocactus from array 'n'"); // Update the plantdump element with the modified array plantDumpElement.innerHTML = JSON.stringify(n); } else { console.log("Hydrocactus not found in array 'n'"); } } })();