Infinite Craft Userscript [updated] May 2026

autoLearnBtn.disabled = false; autoLearnBtn.textContent = '⚡ Auto-learn new';

function init() // Store discovered elements and recipes let discovered = new Set(); let recipes = new Map(); // elementName -> [left, right] infinite craft userscript

document.body.appendChild(panel);

toggleBtn.addEventListener('click', () => recipesPanel.style.display = recipesPanel.style.display === 'none' ? 'block' : 'none'; ); autoLearnBtn

// Hook into the game's internal events if possible (monkeypatch) let originalAddElement = null; if (window.addElement) originalAddElement = window.addElement; window.addElement = function(element, ...args) if (element && element.name) null; if (lastCombine && lastCombine[0] && lastCombine[1]) recipes.set(element.name, [lastCombine[0].name, lastCombine[1].name]); updateRecipeBook(); return originalAddElement.apply(this, [element, ...args]); ; autoLearnBtn.disabled = false

// Manual recipe addition from user combining function addRecipeFromCombine(left, right, result) if (left && right && result) recipes.set(result, [left, right]); updateRecipeBook();

// Attach click handlers to rows document.querySelectorAll('.ic-recipe-row').forEach(row => row.addEventListener('click', (e) => const left = row.getAttribute('data-left'); const right = row.getAttribute('data-right'); if (left && right) autoCraft(left, right); e.stopPropagation(); ); );