Facebook comments tag cleaner

Deletes Facebook comments someone is tagged in, as these are usually of no interest whatsoever

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Facebook comments tag cleaner
// @namespace    http://mutux.org/
// @version      0.1
// @description  Deletes Facebook comments someone is tagged in, as these are usually of no interest whatsoever
// @author       Joakim
// @match http://*.facebook.com/*
// @match https://*.facebook.com/*
// @grant        none
// ==/UserScript==

do {
	var someRemoved = false;

	comments = document.getElementsByClassName("UFIComment");

	for (var i = 0; i < comments.length; i++) {

		comment = comments[i];
		text = comment.getElementsByClassName("UFICommentBody")[0];

		/* if (text.firstChild.className == "profileLink") { */
		if (text.getElementsByClassName("profileLink").length > 0) {

			comment.parentNode.removeChild(comment);
			someRemoved = true;
		}
	}
} while(someRemoved);