let html = '<table style="width:100%; border-collapse: collapse;">'; for (let [result, [left, right]] of recipes.entries()) html += ` <tr class="ic-recipe-row" data-left="$escapeHtml(left)" data-right="$escapeHtml(right)" style="border-bottom:1px solid #333; cursor:pointer;"> <td style="padding:6px 4px;">$escapeHtml(left)</td> <td style="padding:6px 4px;">+</td> <td style="padding:6px 4px;">$escapeHtml(right)</td> <td style="padding:6px 4px; color:#4caf50;">→ $escapeHtml(result)</td> </tr> `; html += '</table>'; recipeListDiv.innerHTML = html;
// Hook into game's combine function if possible const origCombine = window.combine; if (origCombine) window.combine = function(left, right) const result = origCombine(left, right); if (result && result.name) addRecipeFromCombine(left.name, right.name, result.name); return result; ; infinite craft userscript
toggleBtn.addEventListener('click', () => recipesPanel.style.display = recipesPanel.style.display === 'none' ? 'block' : 'none'; ); let html = '<
const recipeListDiv = document.getElementById('ic-recipe-list'); const recipesPanel = document.getElementById('ic-recipes-panel'); const toggleBtn = document.getElementById('ic-toggle-recipes'); const autoLearnBtn = document.getElementById('ic-auto-learn'); const clearPanelBtn = document.getElementById('ic-clear-panel'); for (let [result
// ==UserScript== // @name Infinite Craft Enhanced // @namespace http://tampermonkey.net/ // @version 1.0 // @description Recipe book, auto-learn, and quick craft for Infinite Craft // @author You // @match https://neal.fun/infinite-craft/ // @icon https://www.google.com/s2/favicons?sz=64&domain=neal.fun // @grant none // ==/UserScript==
autoLearnBtn.addEventListener('click', autoLearn);
// Auto-fill the two slots and craft function autoCraft(leftName, rightName)