elbywan/yett

Partial unblock from the blacklist

vladiiancu opened this issue · 1 comments

Let me start of by saying that maybe I'm missing something basic.
The situation is this. I use a blacklist. Everything works as advertised. I'm blocking Google, Facebook and Hotjar.
I have an unblock() action attached to a button. It also works as advertised.

So far so good. What I'm wondering is, how can I make a partial unblock? If I click on a button I would like to unblock Facebook from the previous list and keep Google and Hotjar blocked.

Something like yett.unblock('facebook.com') doesn't work;

Well, never mind :)

Apparently I need to keep the same format as in the blacklist.
Therefore, something like window.yett.unblock('/vars\.hotjar\.com/', '/static\.hotjar\.com/', '/script\.hotjar\.com/'); will work like a charm.