Facebook Ad Killer

By GDoutch Last update Mar 8, 2009 — Installed 25,641 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 31 posts, 11 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
bighaugs User

I thought this script was great (it performs as advertised), but it SERIOUSLY slows down the javascript (?) on certain actions in Facebook, at least for me. Tagging photos, for example, became an exercise in patience; it would take 5-6 seconds for the tagging box to appear. Often, simple text entry would also fall into an interminable lag, to the point where my OS (Vista HP) thought that Firefox had crashed.

I assumed that the problem was in my FF installation. After a completely fresh install, however, I realized (by trial-and-error) that this script was causing my problems.

 
GDoutch Script's Author

Hey,

This shouldn't really affect the facebook chat feature. I haven't seen a problem, but I don't use it much myself.

 
guitarmex User

Hey man, I hate to nitpick, but it really lags out the browser window when I open up my facebook chat tab and click on someone to send a message.

 
thebuddhist User

w00t! F corporate amerika and their lame ads, works great in FF3.

 
GDoutch Script's Author

Updated:

// Ver 1.9
// Hide the sidebar instead of remove to prevent the layout screwing up

 
2CollegeBums User

I love this script.
At the end of the removeSideBar function I added:
document.getElementById('right_column').setAttribute("style","margin-right:160px");
This prevents the whole right column from being shifted over 160px because the sidebar is removed.

 
GDoutch Script's Author

Actually, this one gets rid of more ads than the one @ 31080

 
GDoutch Script's Author

This one is better:

http://userscripts.org/scripts/show/31080

I recommend it to anyone who is thinking of installing this script.

 
GDoutch Script's Author

Ver 1.8
Switched to a single removeEmbeddedAds() function for removing all ads found by class='something to do with ads' inside every div element on the page.

This is because facebook updated their ad insertion method on the home_sidebar

 
GDoutch Script's Author

@codam That userstyle is good, but still allows news feed ads to slip through. Used in conjunction with this script kills them all. It still doesn't quite resize for all pages, but is good enough anyway.

 
GDoutch Script's Author

Thanks for pointing that out codam. Never heard of userstyles before.

 
codam User

@Tom Gallagher: http://userstyles.org/styles/9021.html does just that (although a lot of other stuff too which you might not want..)

 
GDoutch Script's Author

Ver 1.7

GM_addstyle was nice but leaked ads in the news feed.
Reverted to previous method that worked better.

 
GDoutch Script's Author

Simplified a great deal using GM_addstyle.

 
GDoutch Script's Author

Ver 1.6 Added an eval to take care of the error messages.
commented out the on load command as DOMNodeInserted takes care of it all!

 
GDoutch Script's Author

Yeah I know. I don't really know how to do that at the moment.

If anyone has any code (zorlan's doesn't work for all of new.facebook.com/* ) they can post it here or make their own script based on this. I don't mind, just let me know so I can install it :)

 
Tom Gallagher User

It would be great if you could expand the newsfeed and other items to occupy the freed up space :D

 
GDoutch Script's Author

Yeah, I get that too. But it's definitely not 'null'. I'll look into it some more.

 
Logan Koester Scriptwright

I'm getting a "document.getElementById("newsfeed_wrapper") is null" error from Firebug for this script, though it seems to work fine.

 
GDoutch Script's Author

Ver 1.5:
Added class name to catch more feed ads - expect this to grow as more come along.
Fix made for the home page sidebar sponsor removal that wasn't working too great before.
It seems that document.addEventListener("DOMNodeInserted", removeAds, true) works after all. There were rumours of a bug, I don't know what it is.

 
Zorlan User

I wrote a similar script, and used the following code to allow an app to take up the remaining space:

var contentNode = document.getElementById('content').childNodes[0].childNodes[0];
contentNode.style.width = "100%";
contentNode.childNodes[0].style.width = "auto";

Note: this code is only for apps.new.facebook.com, but it doesn't have any affect on the other parts of facebook as far as I've tested.

 
yanksoccer117 Scriptwright

yo, you hit it on the head with document.addEventListener("DOMNodeInserted", removeAds, true); thanks

 
GDoutch Script's Author

Ver 1.4:
Added another little function to remove the sponsored ad that resides within the main page right-hand-side updates container

 
GDoutch Script's Author

Ver 1.3 Now.

Ads have already begun appearing in the news feed. This must be stopped at all costs! :)

Support added to do this!

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel