Facebook Sponsored News Remover

By Tosk Last update Nov 12, 2006 — Installed 2,156 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 3 posts, 2 voices



Jesse Andrews Admin

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

 
Kawauso Scriptwright
Tweaked it so it runs on home.php regardless of parameters (it didn't run without the trailing ?) and only deletes if the span contents matches pefectly (seems to work fine) // ==UserScript== // @name Facebook Sponsored News Remover // @author Tosk // @date 2006-11-11 // @version 1.0 // @namespace http://www.tosker.net // @description Removes sponsored news in the news feed. // @include http://*.facebook.com/home.php* // ==/UserScript== (function() { var ttags = document.getElementsByTagName('span'); //alert(ttags[0]); for (var i=0;i < ttags.length;i++) if (ttags[i].innerHTML == "Sponsored") { ttags[i].parentNode.parentNode.parentNode.parentNode.removeChild(ttags[i].parentNode.parentNode.parentNode); //ttags[i].parentNode.parentNode.insertBefore("

",ttags[i]); } })();
 
Kawauso Scriptwright

I was just looking for a script like this to deal with the sponsored news that seems to be more frequent lately. Thanks!

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