I'll start with an example: Say you're searching an online store for a product that is [XYZ] compatible. But the result page or product listing page don't display that information, and item compatibility is not searchable, so you have to click each product and check. This can be very arduous when you have 100+ products to look through.
I have come across numerous browser plugins for search result pages (such as eBay or Craiglist) of which will crawl through and visit each result link, and then display a piece of information on the result page for each item. Now I know what is [XYZ] compatible before clicking!
I want to write a script for a particular website's search results.
- Can I achieve this using vanilla JavaScript? How? (I'd prefer something simple like a bookmarklet)
- If not, what would I need to accomplish this?
I just want to know which result is XYZ compatible, and then highlight it on the result page. I imagine it would be something like using cURL to load each link, and then using string slicing to find the compatibility text.