HabitRPG / habitica-chrome

Chrome extension for HabitRPG. Uses 3rd party productivity website events to trigger point gain/loss.
https://chrome.google.com/webstore/detail/habitrpg/pidkmpibnnnhneohdgjclfdjpijggmjj?hl=en-US
GNU General Public License v3.0
109 stars 47 forks source link

Support multi-level domains and sub-domain preference #148

Closed brazilianldsjaguar closed 8 years ago

brazilianldsjaguar commented 8 years ago

By 1) using regex to grab the whole domain and 2) comparing the whole domain, and then comparing each level of that domain in a sub-domain-removing order, we are able to support multi-level domains such as "google.com.br" sites, as well as sub-domain-preferred sites (e.g. "facebook.com" in the bad, "developers.facebook.com" in the good).

brazilianldsjaguar commented 8 years ago

I got the RegEx for the URL here: https://tools.ietf.org/html/rfc3986#appendix-B

paglias commented 8 years ago

Thanks!

Tier awarded! You can read more about contributor tiers and rewards here.

Note that as your tier increases, it takes progressively more work to achieve the next one, so for the higher tiers, larger PRs or a few PRs are required. There's some information about that at Contributor Rewards, but feel free to ask here if you have questions!