您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Save recipes in IC Helper when using API in console
当前为
// ==UserScript== // @name IC save API recipes // @namespace http://tampermonkey.net/ // @version 1.0 // @license MIT // @description Save recipes in IC Helper when using API in console // @icon https://i.imgur.com/WlkWOkU.png // @author @activetutorial on discord // @match https://neal.fun/infinite-craft/ // @run-at document-end // @grant none // ==/UserScript== (function() { 'use strict'; window.saveapirecipesdata = { ogFetch: null, start: function () { if (document.querySelector('.settings-content')) { // Wait for IC Helper this.infinitecraft = window.$nuxt.$root.$children[1].$children[0].$children[0]; this.ogFetch = window.fetch; window.fetch = async function (...args) { const response = window.saveapirecipesdata.ogFetch.apply(this, args); setTimeout(async () => { try{ if (args[0] && args[0].split("?")[0] === "https://neal.fun/api/infinite-craft/pair" && !(args[1] && args[1].signal)) { const first = decodeURIComponent(args[0].split("?")[0].split("&")[0]); const second = decodeURIComponent(args[0].split("?")[0].split("&")[1]); const result = response.text; await window.addElementToCrafts({ text: first, emoji: "⬜", }, { text: second, emoji: "⬜", }, result); // console.log("It works!"); } } catch (error) { console.error("Failed to add recipe to IC Helper", error); } }, 0); return response; } } else { setTimeout(this.start.bind(this), 200); } } }; window.saveapirecipesdata.start(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址