Widget:Calculator/RecipeCost

From HighSpell Wiki
Jump to navigation Jump to search
 
      

Recipe Cost Calculator

Item Quantity Buy cost (general) Buy cost (trade)
TODO: item choice TODO: general store cost
Sum {{CostDisplay|123}} {{CostDisplay|123}}
]]> <script><![CDATA[ function addItemRow() { const tableid = "cost-calculator-table"; const table = document.getElementById(tableId); if (!table) return;
     const rows = table.rows;
     if (rows.length < 2) return;
     const secondRow = rows[1];
     const clone = secondRow.cloneNode(true);
     secondRow.parentNode.insertBefore(clone, rows[2]); // insert after the second
   }
 ]]></script>

</html>