metric-cooking
metric-cooking copied to clipboard
Only partially works on preppykitchen.com
See e.g. https://preppykitchen.com/easy-tiramisu/:
Only the size of the baking dish got converted, and some additional stuff in the instructions later on (not included in screenshot).
This one is tricky. The HTML is:
<li class="wprm-recipe-ingredient" style="list-style-type: none;">
<span class="wprm-checkbox-container">
<input type="checkbox"
id="wprm-checkbox-3"
class="wprm-checkbox"
aria-label=" 1 1/2 cups espresso">
<label for="wprm-checkbox-3" class="wprm-checkbox-label">
<span class="sr-only screen-reader-text wprm-screen-reader-text">▢</span>
</label>
</span>
<span class="wprm-recipe-ingredient-amount">1 1/2</span>
<span class="wprm-recipe-ingredient-unit">cups</span>
<span class="wprm-recipe-ingredient-name">espresso</span>
</li>
So there's an input
element, which is normally used to transfer something to the server. I'd normally want to keep the script out of that to avoid any danger of submitting modified text to a server, so I'd avoid touching anything in this <li>
. However here it's not actually submitting something to a server (there's no name
or value
attribute), it's just used to get the user interaction (ticking off the items).
I'll have to think about whether I can handle this somehow.