mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
Ignore empty recipes
This commit is contained in:
parent
59b690be6c
commit
b096529704
2 changed files with 3 additions and 1 deletions
|
|
@ -204,7 +204,7 @@
|
|||
el("div", {}, error),
|
||||
el("form", {method: "dialog"},
|
||||
|
||||
el("button", {onclick:history.back.bind(history)}, "Learn More"),
|
||||
el("button", {onclick:() => location.href = "https://parse.bitty.site"}, "Learn More"),
|
||||
el("button", {onclick:history.back.bind(history)}, "Go Back")));
|
||||
document.body.appendChild(dialog)
|
||||
dialog.showModal();
|
||||
|
|
|
|||
|
|
@ -126,6 +126,8 @@ let scrapeRecipe = async document => {
|
|||
|
||||
|
||||
let recipe = findLDJsonRecipe(doc) || findMicrodataRecipe(doc) || await scrapeRecipe(doc);
|
||||
|
||||
if (!recipe.recipeInstructions) recipe = undefined;
|
||||
if (recipe) {
|
||||
|
||||
let url = doc.evaluate('//meta[@property="og:url"]/@content', doc, null, XPathResult.STRING_TYPE)?.stringValue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue