RecipeFilter icon indicating copy to clipboard operation
RecipeFilter copied to clipboard

Add selector for smittenkitchen, Add support for recipes that are more than one node

Open worc opened this issue 6 years ago • 2 comments

i haven't tested the other websites to see if the else path causes any breaking changes. i'm not entirely sure which sites the other selectors are for, but if there's a list somewhere, i'll gladly run through a few test pages.

worc avatar Mar 13 '19 22:03 worc

The if ($r.length === 1) was important long ago and I can't recall exactly why, but if multiple selectors match, it's an indication that it shouldn't run on the site. I think maybe it was trying to run on search results and blog homepages with multiple recipes.

Let's break the PR up:

  • (Looks good to go) cleaning up with const controls, nice!
  • (Looks good to go) smittenkitchen selector (or does it need to match multiple?)
  • (Needs a separate PR to vet/test) handling when $r.length>1

sean-public avatar Mar 13 '19 23:03 sean-public

ok, i split out const controls to its own pr, https://github.com/sean-public/RecipeFilter/pull/12. yeah, the smittenkitchen recipe is $r.length > 1. the selector for it is made a little easier because they have a noprint class on the essay part of their recipe, but you still have to gather up more than one node.

worc avatar Mar 15 '19 21:03 worc

Waited so long that they changed the site and now it works without any of the multi-matching changes in this PR. Closing because the other great stuff was already broken out and merged in!

image

sean-public avatar Jan 20 '24 08:01 sean-public