Personally, I use Firefox + uBlock Origin + NoScript and have all scripting disabled by default (and use a separate browser profile for shady business). I don't get any ads or popups on anonfiles (which works fine without javascript btw). I highly doubt any downloads themselves are affected, because that would take a lot of effort and would not really make sense for e.g. .var files. Also, it would require cooperation by anonfiles themselves or a compromised network. Nope.
These drive-by attacks (you visit a site and get infected) are nearly always done using external, rogue ads (and javascript). Disabling scripting eliminates 99.9% of attack surface, so NoScript is your best bet, although a bit annoying when you're not used to it, because for many sites you will have to selectively enable js in order for them to work.
You can of course install software that live-scans your browser content but that won't guarantee anything and might actually open up additional attack surfaces as these "security" solutions tend to run with system level privileges, while the browser does not. Browser vendors actually warn against using that stuff, because it punctures the browser's sandbox and as such can
weaken your browsers security. Just because it warns you all the time does not mean you're actually safer.