diff options
author | Joris | 2020-02-02 16:51:57 +0100 |
---|---|---|
committer | Joris | 2020-02-02 16:51:57 +0100 |
commit | bc97048dfbb05766abf0c04aed593252a3abdc88 (patch) | |
tree | 25cea9c393b430fe5ba825547e2cd88a08940498 /main.ts | |
parent | 1bdaf18073d82aa3e243d33f073fca3d69ee451f (diff) |
Show recipe title in each recipe page
Diffstat (limited to 'main.ts')
-rw-r--r-- | main.ts | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,6 +1,6 @@ /* Set up done marks for steps */ -nodeListToArray(document.querySelectorAll('.g-Recipe ol > li')).forEach(todo => { +nodeListToArray(document.querySelectorAll('.g-Recipe__Content ol > li')).forEach(todo => { todo.onclick = e => { toggleClassName(todo, 'g-Recipe__Completed') e.stopPropagation() @@ -18,10 +18,10 @@ function toggleClassName(node: Element, className: string) { /* Set up inputs for the ingredients */ const itemEntries = - nodeListToArray(document.querySelectorAll('.g-Recipe ul > li')) + nodeListToArray(document.querySelectorAll('.g-Recipe__Content ul > li')) .map(itemNode => ({ tag: 'li', node: itemNode })) -const h1 = document.querySelector<HTMLElement>('.g-Recipe h1') +const h1 = document.querySelector<HTMLElement>('.g-Recipe__Content h1') if (h1 !== null) { itemEntries.push( |