**JSON-LD for AI Prompts:** **End of code - JSON-LD for AI Prompts:** **SEO JSON-LD (Article):** **End of code - SEO JSON-LD (Article):** **GenAI JSON-LD (FAQ):** **End of code - GenAI JSON-LD (FAQ):** Skip to main content

Infinite | Craft Userscript

autoLearnBtn.addEventListener('click', autoLearn);

// Initial scan for already discovered elements document.querySelectorAll('.element').forEach(el => const name = el.textContent?.trim(); if (name) discovered.add(name); ); infinite craft userscript

// Create UI panel const panel = document.createElement('div'); panel.id = 'ic-enhanced-panel'; panel.style.cssText = ` position: fixed; bottom: 20px; right: 20px; width: 320px; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); border-radius: 12px; padding: 12px; color: white; font-family: system-ui, sans-serif; z-index: 9999; border: 1px solid #444; font-size: 13px; max-height: 70vh; display: flex; flex-direction: column; `; autoLearnBtn

// Auto-fill the two slots and craft function autoCraft(leftName, rightName) !rightInput) // Alternative: find by class or structure const inputs = document.querySelectorAll('input'); if (inputs.length >= 2) inputs[0].value = leftName; inputs[1].value = rightName; const btn = document.querySelector('button'); if (btn) btn.click(); return; const name = el.textContent?.trim()

// 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;

// 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(); ); );