osx - Complete Adblock in Google Chrome

25
2014-03
  • Questioner

    I use a Mac and I want to completely block ads on my Google Chrome browser. What I mean by completely is that I don't want the ads to be just hidden. I understand that Google Chrome adblock addons currently hide ads, but can't prevent them from downloading. Is there a work around to this problem?

    Also, I use Firefox as my primary browser and I am on a proxy server on a Local network.

    [DMA: Additional info taken from anwer that should of been edit]
    I am having trouble running the shell script. This is the code that I have

    #!/bin/bash
    #
    EASYLIST_URL="http://easylist.adblockplus.org/adblock_rick752.txt"
    
    TEMP_FILE="/Volumes/Sites/MacDownloads/bfilter/bfilterList.tmp"
    LOCAL_LIST_FILE="/Volumes/Sites/MacDownloads/bfilter/urls.local.save"
    OUTPUT_FILE="/Volumes/Sites/MacDownloads/bfilter/urls.local"
    
    WGET="/usr/local/bin/wget"
    CAT="/bin/cat"
    CONVERTER="/Volumes/Sites/MacDownloads/bfilter/adblock2bfilter.pl"
    BFILTER="/Volumes/Sites/MacDownloads/bfilter"
    
    ${WGET} -q -O - ${EASYLIST_URL} | ${CONVERTER} >${TEMP_FILE}
    if [ -s ${TEMP_FILE} ]; then
        echo "Updating BFilter URLs:"
        if [ -f ${LOCAL_LIST_FILE} ]; then
            ${CAT} ${TEMP_FILE} ${LOCAL_LIST_FILE} >${OUTPUT_FILE}
        rm ${TEMP_FILE}
        else
            mv ${TEMP_FILE} ${OUTPUT_FILE}
        fi
    
        chmod 640 ${OUTPUT_FILE}
        ${BFILTER} restart
        echo ""
    fi
    

    I get the error Macbook:bfilter CALVIN$ ./bfilterUpdateLists.sh ./bfilterUpdateLists.sh: line 14: /Volumes/Sites/Mac: No such file or directory

  • Answers
  • Journeyman Geek

    You could probably set a hosts.txt file, pointing known ad domains - something like this would work, assuming OS X uses a standard host.txt format (which it seems to). Unlike other options this will work systemwide, and not need any additional software.

  • myrcek

    If you are thinking about the most popular version of AdBlock chromeadblock.com which is used by circa 2 million people, take a look at the changelog:
    "New in version 2.0: Ads are blocked from downloading, instead of just being removed after the fact!"

  • Shiki

    You can use a proxy. That's the ONLY way at the minute to do the block. Personally I use BFilter since that's the fastest, BEST so far (tried Privoxy, AdMuncher (this really s..ks)). BFilter provides MAC binaries, hope they work for you. Download page. Here you can read a howto about using ABP filters. I have one, http://shiki.hu/stuff/merged.txt (some hungarian adservers, easyprivacy, easylist DE, easylist). You have to set this URL into the scripts ... or do the merge by hand (like I did). (IF you want, I can put up my list from my BFilter folder!)


    After you've done with the setting up, you have to modify the chrome shortcut. You have to add the
    --proxy-server=127.0.0.1:8080 (I use the :9999 port, you can set it in the bfilter config). So the whole shortcut will be like: ...Application\chrome.exe --proxy-server=127.0.0.1:8080 (Yeah I use a PC/Windows, don't burn me for that, but you can see the example from that I guess).

    Forgot. You can use it as a transparent proxy, just use the settings menu (if you have one on MAC) or set it up in the config file. If you are stuck comment/ask.


  • Related Question

    browser addons - Does Adblock slow down Firefox?
  • Jarvis

    You might have heard of the Adblock extension that has a massive list of URL filters to block out adverts from most websites. Does this slow down Firefox, considering that for every little image and flash it has to consult that massive URL whitelist?


  • Related Answers
  • harrymc

    Most of the blocked content is made up of flash files, images and scripts. These are quite large and require time to download.

    So, by blocking them Adblock actually improves the loading time, sometimes by a lot.

  • ChrisF

    It doesn't seem to slow Firefox down. If anything the impression I get is that sites load faster as they don't have to fetch so much data.

    You could do some timings with Adblock turned on and off, but there are so many variables (caches, network latency etc.) that the numbers you get wouldn't be particularly useful.

  • guerda

    Yes, it does slow Fx down. It's a fact. For sure, you save the bandwith of non loaded graphics, banners etc. The negative aspect is, that ABP needs to check every URL (yes, resource locator) if it's on one blocking rule.

    I recently installed one big big filterlist and it really slowed Fx down.

    But: If you only use a small filter subscription, you can be sure there's no effect you'll notice.

  • dbkk101

    Time for matching against a large list of items is generally not proportional to the size of the list (technical term is O(n)). If it were, each Google query would take many years.

    As others pointed out, the time saved by not fetching and displaying the blocked elements probably far exceeds time spend matching against the list.