nareddyt / discover-rewards-notifier

A Chrome Extension that shows a notification when visiting sites that qualify for Discover® Deals or Cashback Rewards.
https://www.tejunareddy.com/discover-rewards-notifier/
GNU General Public License v3.0
6 stars 14 forks source link

Better tab title matching #67

Open nareddyt opened 6 years ago

nareddyt commented 6 years ago

In #66, we introduced a new way to determine which offers should appear on a webpage. Specifically, we now fallback to checking the title of the tab and trying to match that to a retailer name in the data files.

For example, when I google for j. crew, the following appears because the tab name has j. crew in it:

image

However, this doesn't work if I google for j.crew or j crew because our matching algorithm just does a ignorecase string match.

We should add support for the following string match algorithms:

Also, we should also try to match the tab title against the hostname. That way, if I search for ae in google, it gives me a deal for American Eagle because the site url is www.ae.com.

nareddyt commented 6 years ago

See #70 for another example of bad title matching. In #70's case, we were not strict enough and were matching anything, even if it wasn't a full word.

itsthecheat commented 6 years ago

Hey @nareddyt , would love to work on this

nareddyt commented 6 years ago

Go ahead! Let me know if you have any questions