Infinite Craft Userscript ((full)) Access
// Auto-learn: repeatedly combine the newest discovered with everything async function autoLearn() autoLearnBtn.disabled = true; autoLearnBtn.textContent = '⏳ Learning...';
// Manual recipe addition from user combining function addRecipeFromCombine(left, right, result) if (left && right && result) recipes.set(result, [left, right]); updateRecipeBook();
// Update the recipe book UI function updateRecipeBook() if (!recipeListDiv) return; if (recipes.size === 0) recipeListDiv.innerHTML = '<div style="color:#888; padding:8px;">No recipes yet. Combine elements to learn!</div>'; return; infinite craft userscript
autoLearnBtn.addEventListener('click', autoLearn);
clearPanelBtn.addEventListener('click', () => recipes.clear(); updateRecipeBook(); ); // Auto-learn: repeatedly combine the newest discovered with
panel.innerHTML = ` <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;"> <strong>🔧 Infinite Craft Tools</strong> <button id="ic-toggle-recipes" style="background:#2a2a2a; border:none; color:white; border-radius:6px; padding:2px 8px; cursor:pointer;">📖 Recipes</button> </div> <div id="ic-recipes-panel" style="display: none; overflow-y: auto; max-height: 300px; margin-top: 8px; border-top: 1px solid #333; padding-top: 8px;"> <div style="font-size:12px; color:#aaa;">Click any recipe to auto-fill and craft</div> <div id="ic-recipe-list"></div> </div> <div style="margin-top: 8px; display: flex; gap: 8px;"> <button id="ic-auto-learn" style="flex:1; background:#1e4a2f; border:none; color:white; border-radius:6px; padding:6px; cursor:pointer;">⚡ Auto-learn new</button> <button id="ic-clear-panel" style="flex:1; background:#4a2f2f; border:none; color:white; border-radius:6px; padding:6px; cursor:pointer;">🗑️ Reset panel</button> </div> `;
document.body.appendChild(panel);
function escapeHtml(str) return str.replace(/[&<>]/g, function(m) if (m === '&') return '&'; if (m === '<') return '<'; if (m === '>') return '>'; return m; );
