From bc97048dfbb05766abf0c04aed593252a3abdc88 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 2 Feb 2020 16:51:57 +0100 Subject: Show recipe title in each recipe page --- main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.ts') diff --git a/main.ts b/main.ts index fef633a..c8cff19 100644 --- a/main.ts +++ b/main.ts @@ -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('.g-Recipe h1') +const h1 = document.querySelector('.g-Recipe__Content h1') if (h1 !== null) { itemEntries.push( -- cgit v1.2.3