Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
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("
|
|
|
I was just looking for a script like this to deal with the sponsored news that seems to be more frequent lately. Thanks! |