SAFARI: Blocking specific domains from ever launching pop-ups?
Can someone tell me if there is some way to block a specific domain from ever launching via a pop-up window? Without using Parental Controls. The solution I would most like is an extension, I am unable to do this with AdBlock or Javascript Blacklist. I cannot believe Safari doesn't offer a domain blacklist as a standard feature. I cannot believe Safari's window pop-up blocker isn't better.
Comments
If you just need to stop certain sites loading, you can use /etc/hosts and redirect them to 127.0.0.1. That will load a blank popup.
Quote:
Originally Posted by Marvin
If you disable javascript and the popups still work, they must be standard links. If disabling javascript stops the popups, there must be something wrong with the javascript blacklist. You might need to put a wildcard in for the domain e.g *.domain.com.
If you just need to stop certain sites loading, you can use /etc/hosts and redirect them to 127.0.0.1. That will load a blank popup.
How do I do the latter?
In the terminal, type:
cp /etc/hosts ~/Desktop
edit it with TextEdit by adding lines at the bottom with 127.0.0.1 first, then a tab and the URL:
127.0.0.1 www.blockedsite.com
Save and then copy it back to /etc/hosts, you need to use sudo:
sudo cp ~/Desktop/hosts /etc/hosts
You can also edit the file directly using a terminal editor like nano, which saves copying things around:
sudo nano /etc/hosts
scroll down to the bottom and write the above line 127.0.0.1...
hit ctrl-o and then return to save it
ctrl-x to close the file
This is a system-wide change so no matter what browser you use, the site is blocked.