pinoceniccola / what-hn-says-webext

Web Extension: Easily find Hacker News discussions about the page you're currently browsing.
MIT License
266 stars 13 forks source link

Thread not found if URL contains UTM-related query parameters #6

Closed memoryonrepeat closed 3 years ago

memoryonrepeat commented 3 years ago

Hello,

I notice that the extension sometimes can't find the thread if the link contains UTM-related parameters. These are usually generated when clicking to links from newsletters and can be safely removed to improve search quality. What do you think?

Example: https://www.deprocrastination.co/blog/how-to-be-productive-without-forcing-yourself?utm_source=hackernewsletter&utm_medium=email&utm_term=fav

Works after removing all the params: https://www.deprocrastination.co/blog/how-to-be-productive-without-forcing-yourself

If you're busy I can also help with a PR. Thanks for making this extension btw :)

pinoceniccola commented 3 years ago

I'm aware, it may be worth creating a little function that take care of URL canonicalization, including:

Oh yes, contributions are very welcome! Thanks.

memoryonrepeat commented 3 years ago

Sure, created the MR, could you please take a look https://github.com/pinoceniccola/what-hn-says-webext/pull/7