Skipping Ad-pages on with PithHelmet

Honestly I couldn’t visit sites like anymore without tools like PithHelmet thanks to the thousands of Flash ads that nearly kill basically any browser out there. Still, classic ad-blocking can’t really help you with dedicated ad-pages that triggers every now and then. But there’s a quite easy way to get around this using PithHelmet’s MacheteScript feature. This simple Perl script parses the passed page and adds a ne reload element into it if the page looks like one of the ad-pages:

#!/usr/bin/perl -w
        if(/CONTINUE TO 1UP/){
                print '<meta http-equiv="refresh" content="0"/>';
        print $_;

(Sure, this is not really a valid approach, but it works.)


Simply store this script somewhere on your HD with the .pl extension and make it executable using Finder or chmod in the commandline.

Now add a new ruleset in PithHelmet with the Wildcard match “” (sure, this will also hit other pages like etc. but I’m too lazy for a decent regex). Enable the “default site preferences”, go into the advanced tab and select the Perl script you’ve saved in the previous step.

Ah, and if you haven’t enabled MacheteScripts in the PithHelmet preferences, you have to do this now and restart Safari.