How to Block Social Sharing Widgets and Buttons with Adblock

TechAirlines Share

Share buttons here on TechAirlines

Do you share things on the web? Are you tired of seeing all these Tweet, Facebook Like, Digg, etc… buttons everywhere?

Almost all websites, from blogs to forums to large corporation homepages, have some types of sharing buttons to encourage users to share their content and have proven to be very effective.

Share Buttons

Some websites overload their pages with share buttons

The sharing widgets provide a live count to how many times a certain URL has been shared. Some widgets like Facebook take it one step further and show a bunch of faces of others who have liked a certain item. Unfortunately, loading all the sharing widgets can take even longer than the actual content of the webpage, such as Facebook’s slow Like button.

But suppose you don’t really share things on social networks, you’re using an add-on like Shareaholic, you’re concerned with some privacy issues regarding social networking sites, or prefer copying and pasting URLs. How do you get rid of these pesky widgets entirely?

Install Adblock

Adblock extensions do exactly what the name implies. They block advertisements, however they are actually able to do a lot more. What they actually do is block scripts and content from certain domains and HTML tags. So how can Adblock help us here?

Social sharing widgets all load from a certain external domain as well as wrap themself in the same HTML tags, so Adblock can easily look for these tags and domains and block it completely.

Note that you do not actually have to block ads when using Adblock, so you can choose to use Adblock to block only social widgets and allow ads to keep showing.

So start by installing Adblock for your browser:

Adblock Plus for Firefox
Adblock or Adblock Plus for Google Chrome
Adblock for Safari

Note: The filter being used in this tutorial blocks the most popular widgets and buttons, like Facebook, Twitter, and Digg. It is possible to block additional widgets by manually specifying a filter.

Mozilla Firefox – Adblock Plus

Start by right clicking on the Adblock Plus icon and selecting Preferences.

At the top menu, go to Filters > Add a Filter Subscription.

At the bottom of the window, click on a link to Add a different subscription.

Enter a name for this subscription (it can be anything) and the following URL for the location: https://monzta.maltekraus.de/adblock_social.txt, as shown by the screenshot below.

Social Adblock Plus Filter

Click Add Subscription and then Apply and you’re done.

If there’s any widget not part of the filter you would like to block, use the element hider or manually enter a filter by clicking on the Add Filter button.

Safari and Google Chrome – Adblock

The Safari and Google Chrome versions of Adblock are from the same developer and are nearly identical.

Start by going to the extension settings. In Safari, simply click on the toolbar button. In Chrome, go to Menu > Tools >Extensions. Select Options under Adblock (Plus).

On the Options page, head to the Filter Lists tab.

Enter this URL into the Enter a URL field: https://monzta.maltekraus.de/adblock_social.txt

Adblock Chrome Filter

If there’s any widget not part of the filter you would like to block, you can add a filter manually by going to the Blacklist tab.

Enjoy a Faster and Cleaner Web!

Now that wasn’t so hard was it? With this Adblock filter, you can now enjoy a faster and cleaner web.

Adblock Comparison

Before and after using the filter subscription on TechCrunch

Sure, you can just ignore these widgets and buttons, but some sites place so many on their pages that the website slows down to a crawl.

Personally, I like to share things by copying and pasting the URLs manually. What about you? Do you prefer to block these social buttons completely or do you find them useful?

By
Brian is the co-founder of TechAirlines. He is a web developer and manages most of the site’s operations. He is currently a freshman at Stony Brook University, majoring in Computer Science.

  • http://www.techairlines.com Brian Yang

    Please note that this filter does not work on TechAirlines. I am not trying to prevent others from blocking our sharing widgets. It does not work due to the way I set up the widgets for page speed optimization as well as customization (which is why they’re green instead of the default color).

    Our Twitter widget is entirely server side and no data is transmitted between your computer and Twitter at all. This button does not require Javascript at all.

    Our Facebook widget script is hosted locally including the CSS. The only data transmitted between your computer and Facebook is one API call to retrieve the share count. This was originally also server side but unfortunately Facebook’s servers were often very slow causing severe issues (even with caching).

    • http://www.techairlines.com Brian Yang

      Because Facebook and Google+ both do not provide an API for their one-click sharing buttons, as of April 2012, we are now using the official Facebook Like and Google +1 buttons. These buttons will be affected by the filters described in this article.

  • Chris H

    Holy crap — I love you and want to name children after you. (don’t have any of my own so I’ll just call other peoples’ kids Brian, is that okay?) This is so awesome it’s like bacon and beer together. The most messed up part is this is one thing I would actually use a share button for, because the world needs to know.

  • praise the flying spaghetti monster

    many thanks for sharing the URL for the widgets filter.

    (and thank you #1 placement on google too!)

  • Stefan

    nice filter, but it does not block the facebook connect script which let’s facebook know which webpages you surf. more annoying than all the social buttons is the fact, that they capture your surf profile!

  • NNM

    Doesn’t work for THIS website, among others..
    I am sick and tired of seeing those icons spreading like viruses over the net.

    • http://www.techairlines.com Brian Yang

      These filters block the most common methods (default methods) that website owners add those sharing buttons. It will not work on sites that use their own method through the social service’s API.

      The buttons have been proven to be very effective at encouraging readers to share content, but I understand that some people might find them annoying.

  • Charles

    Bless you. 9to5mac now loads effortlessly!

  • Adam

    Thank you for this. It was so annoying to be swinging my mouse towards a link I want to click only to have the link obscured by those pop-up sharing widgets because I accidentally moused over one of them on my way to what I actually wanted to click on.

  • Random Dude

    You are an Internet Hero!

  • Pingback: Anleitung: Social Media Buttons blockieren | picomol.de

  • tovie

    Thank you!! So tired of those floating windows blocking text on sites.

  • Simon

    You are linking to “AdBlock” for Chrome, but the real Adblock Plus is much better: https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb (it is the original from the developer of the Firefox version)

    • http://www.techairlines.com Brian Yang

      Agreed. I added the link to Adblock Plus to the post. Thanks for the info!

  • Pingback: The Mac Couch » Blog Archive » Why wont you just die?!

  • Paul

    Thank you Brian. It’s a very useful tutorial, and a very handy description indeed. Today I just learnt something and thanks to you I finally got rid of those bothersome adds :)

    Thanks again,
    Paul

  • Laura S

    Ghostery (http://www.ghostery.com/about) is another plugin that can be used to block any number of social plugins, trackers, ad networks, etc. You can customize which items you block in excruciating detail (if you like), whitelist individual sites, and temporarily suspend blocking anytime you want to actually see the buttons.

  • monika

    Addblock extension is blocking my facebook link in my site it just facebook button +text over facebook follow us page link.

    Why this happing its not a facebook ad it just facebook page link………
    Any one answer please………..

    • http://www.techairlines.com/ Brian Yang

      That shouldn’t be happening. What CSS class are you using for the Facebook link?

  • ThatGuyWhoComments

    Thank’s so much.

  • Brittany

    Thank you so much for this fix!! I’ve been looking everywhere for something that did this. Yay!! I’m bookmarking this page and since I have firefox sync set up I should never lose this again!

  • http://emrecnl.net/ emrecnl

    thanks a bunch sir. if you also know a way to block “facebook comments” i really appreciate it

  • someotherguy

    Thanks a lot! Adding that fanboy social filter to Adblock Lite worked for me.

    I’m definitely bookmarking this page just in case.

  • AG99

    Thanks! Glad to get rid of all those stupid social networking buttons.

  • David

    Excellent tip. Thank you Brian.

    Facebook I’m not part of your community! Get out of my face!