Jump to content

Anti-matmat script


Antrax

Recommended Posts

For people who use Greasemonkey (an add-on to your browser that lets you write custom scripts to parse web pages. http://www.greasespot.net/), I'm attaching a script that filters out the "Interests" field in people's profiles here. I'm not exactly a web expert and I did this in 10 minutes so there's no option to filter by poster name or to turn it off (other than shutting the script down). But still, if it helps someone else, why not.

function removeInterests()
{
var user_fields = document.getElementsByClassName("user_fields");
for (var j = user_fields.length - 1; j >= 0; --j)
{
 	  var fieldList = user_fields[j].getElementsByTagName("span");
  for (var i = 0; i < fieldList.length; ++i)
  {
	  var txt = fieldList[i].textContent;
	  if ("Interests:" == txt)
	  {
		 fieldList[i].parentNode.removeChild(fieldList[i+1]);
		 fieldList[i].parentNode.removeChild(fieldList[i]);
		 break;
	  } 
  }
}
}
removeInterests();

  • Upvote 11
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...