block popups in safari on specific websites

hi folks

I’m a newbie - wondering if this is possible and if it has already been done?

I want to enable the safari ‘block popup’ feature but just on specific websites. So I guess the script would have to check the url every time a site loads and act accordingly. Seems like it would be handy but I searched around and couldn’t find any examples of a script like this.

Is it possible?

Thanks in advance