How to block/remove advertisements from FaceBook and MySpace

Posted on August 28, 2007 at 3:48 pm

Wouldn’t it be nice if you could browse your FaceBook or MySpace without all of the ads and clutter? Personally, I don’t mind text ads, but I can’t stand those annoying animated flash banner ads that takes longer to load than the rest of the page!!! Why wait an extra few seconds on every page for ads to load up if you’re not going to click on them.

I have found that FaceBook is not quite as terrible as MySpace, where I can barely see anything on my profile page with the header ad, the text ad, the Featured Profile ad, and the footer ad! Luckily, there’s a great tool that you can use that’s part of FireFox to stop all of those annoying ads.

GreaseMonkey, if you’ve never heard of it, is a add-on for FireFox that allows you to manipulate the way a web page is displayed by using small pieces of JavaScript code. So, for example, you can replace buttons, add items to a web page, or add completely new functionality to a web page. To install GreaseMonkey, you’ll need FireFox.

Once you have installed GreaseMonkey, you’ll see it under Tools and also a small monkey face icon in the bottom status bar.

greasemonkey

Make sure the Enabled menu option is checked. Now go to the script resource web site at http://userscripts.org/ to install the FaceBook and MySpace scripts. Simply click on the Install Script button at the top right and wait for a minute or so while it installs. You won’t receive a  message acknowledging that the script was installed, but you can check by choosing Manage User Scripts from the Tools – GreaseMonkey menu item. If it’s listed there, that means it’s installed.

greasemonkey scripts

For me it’s done wonders! Here’s what my MySpace profile looks like without the ad removing script:

myspace ads[1]

There are three huge ads in this screen shot and there’s another one that’s a little lower, but not shown here. Once I installed the script, now my profile page looks like this:

block ads[1]

Far better than what it was like before! Same thing applies to FaceBook, though I really don’t mind FaceBook’s ads since there really is only one and it’s off to the side.

facebook ad facebook ad removed

There are many more ad blocking scripts that you could install, such as for eBay, Amazon, Hotmail, Yahoo Mail, Digg, GMail, Mininova, Anandtech, Rapidshare, Photobucket, IMDB, etc, etc. These will make your browsing much cleaner and much faster!

If you want to block ads while browsing any web site, you can install a FireFox add-on called AdBlock Plus, which blocks most advertisements on the Internet automatically. If something is not blocked, you can right-click on an image and tell it to block that ad manually!

If you want to block text ads from Vibrant Media, AdBrite, Kontera, LinkWorth and EchoTopic use this GreaseMonkey script called Disable Text Ads. Using these four to five add-ons and scripts, your web browsing experience should be ad free!

If you liked this Greasemonkey script, make sure to check out my other post on 25 Greasemonkey scripts you don’t want to miss!

Any questions, post a comment!

[tags]block ads, how to block ads, block internet ads, ad blocker, block advertisements, remove ads, how to stop ads[/tags]

» Filed Under Computer Tips

Related Posts

Comments

29 Responses to “How to block/remove advertisements from FaceBook and MySpace”

  1. Eddie said on :

    Is there a way to remove the myspace ad banner for Internet Explorer?


  2. IGE OLUWASEYE said on :

    Dear Sir

    I really enjoyed reading through your website and those vital information which I found here.

    Please, I wish to make an enquiry if it is possible to block stolen laptop from usage. My laptop was stolen some months ago and want it to be blocked from usage.

    Is it possible? Kindly let me know via my e-mail address. Thanks.

    IGE


  3. Weasel said on :

    To Eddie:

    Yes, it is possible to do the same thing in Internet Explorer. Here’s how:

    Go to Tools->Internet Options, and click on the “Security” tab. Next, click the icon for “Restricted Sites” and the “Sites” button should become enabled. Click that, and it’ll bring up a dialog where you can add individual domains and sites to IE’s blocking list.

    The other part is that you’ll have to log into MySpace, and “View Source” on the HTML, and figure out where/what domains the ads are coming from. I think they’re generated by Javascripts which come from “x.myspace.com” but I’m not 100% sure.. It’ll vary from site to site.

    Example: view source on this page right now. You’ll see right below the AdSense ads, a script coming from “ads.pubmatic.com” — You could add that domain to the blocked sites list, and voila! You’d be viewing this page minus the AdSense block. But DON’T DO IT HERE!

    Of course, you don’t want to do that because you’d be depriving our beloved webmaster Computer Guy of his ad revenue, which defeats his entire idea of monetizing this site, which leads to his overhead costs coming out of his own pocket, all because he wants to provide you and I with this helpful information. So don’t do it here, I was just showing you as an example.

    MySpace is a poorly-designed ad-whoring juggernaut, so your blocking of a tiny fraction of their zillion-dollar-a-day ad income won’t make much difference to them, but it’ll make a world of difference to the web browser of you, the end user!

    –Weasel


  4. Lisa said on :

    Excellent, thank you!


  5. Jimmy said on :

    Um, hmmm. Here’s how to block ads, but just please don’t do it on our site.

    I don’t think so…….


  6. dhen said on :

    I want to block the ads on my profile on tagged, but I don’T know how…please HELP me! I don’T mind if it is just text ad but I hate those ads with disgusting pictures I want them OUT on my page! T_T


  7. Doug C. said on :

    Aseem, thank you very much for this article. I was about ready to deactivate my Facebook account because of the disgusting ads I was getting. Now I am add free, thanks to this.

    I just made a blog post about this with a link to your page here.

    Thanks again.


  8. glenn said on :

    I already use Adblock and NoScript, so I don’t see banner ads and such. Will this block “Sponsored” text ads? That’s what I’m trying to stop.


  9. Doug C. said on :

    Glenn, there is a GreaseMonkey script to disable text ads.


  10. C.M. F said on :

    How do you unblock yourself from someone else’s facebook profile? Is that possible?


  11. awjohnso1 said on :

    The ad blocker plus worked great for facebook. Thank you very much. Their ads were a little annoying. You were a big help.


  12. carolina said on :

    how can i block Facebook, Myspace, and adult web pages ?


  13. snarfy23 said on :

    @carolina: Unplug your network cable ^_^


  14. akishore said on :

    Carolina, if you want to block entire web pages, not just advertisements, you need to get some kind of parental control software. Read my previous post here on how to block Internet websites using free software.


  15. Rene' said on :

    I’m using IE on Facebook. An offensive ad popped up on my Facebook profile, so I rt clicked on the ad and copied the url and pasted it into the Restricted Sites zone of the Securities tab as instructed above, and when I refreshed the page that one particular ad was gone, but 4 more (albeit nonoffensive) popped up in its place. I would love an ad free profile page, offensive or no. What am I doing wrong.
    Thank you for your help!


  16. Sam said on :

    what about blocking facebook adverts on Google Chrome?!


  17. Carl said on :

    Is there a way of removing facebook ads on internet explorer? I’ve tried the security and restricted sites and that doesn seem to be workin.


  18. Weasel said on :

    I just discovered another way to block Facebook ads in IE! Make a file called “usercontent.css” and put it somewhere safe (such as My Documents).. Next, edit the file (using a text editor) and put the following in it (minus the BEGIN/END lines, of course):

    ————-BEGIN What-To-Put-In-It—————–

    #ssponsor, .footer_ad, .banner_ad, .social_ad, .ad_capsule, .sidebar_ads, .adcolumn, .admarket_ad, .sidebar_item.sponsor, .emu_sponsor, .home_sponsor, .UITitledBox_Title
    {
    display: none !important;
    }

    ————-END What-To-Put-In-It—————–

    Next, in IE go to Tools->Internet Options, and click on the “Accessibility” button. Select the “Format documents using my style sheet” checkbox, and browse to the usercontent.css file you created earlier. Click OK, OK, then Facebook ads should be hidden! They will still be pulled from the server and loaded by the browser, but the stylesheet will refuse to display them, as they are now hidden!

    I imagine that this same trick can be applied in Firefox without Greasemonkey (or any Mozilla browser, for that matter) as well. Just add it to the usercontent.css file (see Google for more info on usercontent.css)

    I dunno if Google Chrome has user-definable CSS, but if it does then this should work there too!


  19. Derrick S. said on :

    To Weasel:

    Well that was just dandy, it disabled the ads on the side, but it crippled flash too! Is there any way to get the ads gone, but not cripple flash?


  20. facehatebook said on :

    Thanks, it works like a charm for facebook.


  21. Zed said on :

    That worked really well, took a few seconds to install and means that facebook is now usable on a netbook!


  22. BARRRY said on :

    Hello i tried to install greasemonkey and no matter where i try to download it from even doing a google search, but i get this message every time i try to download… please can anyone help, i am a novice computer user so please try and explain as easily as you can thanks BARRY.

    Firefox could not install the file at

    addons.mozilla.org/en-US/firefox/downloads/latest/748/addon-748-latest.xpi?src=addondetail

    because: Invalid file hash (possible download corruption)
    -261


  23. Dee said on :

    I added Greasemonkey and I still have adds. Whats going on?! It doesn’t work if I refresh the page or if I log out then, log in again. Please help. Ads are slowing my comp waaaaaay down.


  24. Steve said on :

    Want to get rid of advertisements on Facebook?

    There’s a new, up to date greasemonkey script what will set the visibility of all ad blocks on Facebook pages to ‘hidden’.

    That way you browse Facebook “ad-free”.

    userscripts.org/scripts/show/78096

    or

    facebook.com/group.php?gid=121779507861362&v=info


  25. Steve said on :

    If you’re having issues with the above scripts mentioned in the posts, it might be because they have not been updated.

    Here is a working script for greasemonkey, which removes all ads from Facebook:

    userscripts.org/scripts/show/78096


  26. Sue said on :

    I’ve used some of the scripts mentioned here, but the ads still show up on the right hand side in Facebook. What am I doing wrong?


  27. Weasel said on :

    From what I’ve noticed, Facebook ads use different DOM object names depending on what FB page you are viewing.. For instance, the right-hand ads on your Wall will be differently named objects from the right-hand ads on your Groups & Pages page.. Have to find out all of the object names and block them accordingly..


  28. Ads said on :

    Ad Muncher is the best ad blocker out there !


  29. Verushka said on :

    Concerning my myspace webpage, I synced my myspace webpage to my facebook webpage. Now on top of my myspace webpage there is a large banner ad saying that I synced my myspace account to my facebook account. I unsynced my myspace account to my facebook by going into my account, sync. It still is showing the large banner ad on the top about me syncing my pages on Aug. 31. Please do you know how to remove this banner ad information. I’ve already activated ad blocker and also grease monkey and my space add image link2.

    Thanks,

    V

    The code is something like this when I highlight the box.

    synced their Myspace account to Facebook3:49 PM Aug 31


Please post your comments/suggestions!