Skip to content

Instantly share code, notes, and snippets.

@ginpei
Created December 29, 2022 11:40
Show Gist options
  • Save ginpei/ea7eb0325880e4798dab43bc21ab9781 to your computer and use it in GitHub Desktop.
Save ginpei/ea7eb0325880e4798dab43bc21ab9781 to your computer and use it in GitHub Desktop.
Dim off items without keywords in Amazon search result
var words = twotabsearchtextbox.value.split(" ");
[...document.querySelectorAll(".s-result-item")]
.filter((v) => !words.every((w) => v.textContent.toLowerCase().includes(w)))
.forEach((v) => v.style.opacity = "0.3")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment