Just get a script-blocker. For example, the
NoScript extension for Firefox. Activate it before visiting a shady website. It blocks ALL scripts by default, and then you can temporarily turn each one on until you've got just enough functionality to use the website the way you want without all that extra stuff that shoves ads in your face to the point of slowing your computer down. Even if you click on the wrong thing and a pop-up does make it through, the pop-up's scripts will be disabled by default, too.