whytrusttomhanks / Kinky Misanthropy

// ==UserScript==
// @name         Kinky Misanthropy
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  keep your FetLife friends from ruining a good thing
// @author       WhyTrustTomHanks
// @match        *://fetlife.com/*
// @grant        none
// @license      MIT
// @require      http://code.jquery.com/jquery-latest.js
// ==/UserScript==


function misanthropeAGoGo(){
    
  $('#stories').each(function(){
    $(this).find('tr').each(function(){
      if ($(this).is(':contains("became friends with"), :contains("followed"), :contains("loved"), :contains("commented"), :contains("responded"), :contains("is into"), :contains("is curious"), :contains("wall")')) {
        $(this).css("display", "none");
      }
    });
  });
  

  $('#stories-list').each(function(){
    $(this).find('article').each(function(){
      if ($(this).is(':contains("became friends with"), :contains("followed"), :contains("loved"), :contains("commented"), :contains("responded"), :contains("is into"), :contains("is curious"), :contains("wall")')) {
        $(this).css("display", "none");
      }
    });
  });  

  $('#mini_feed').each(function(){
    $(this).find('li').each(function(){
      if ($(this).is(':contains("became friends with"), :contains("followed"), :contains("loved"), :contains("commented"), :contains("responded"), :contains("is into"), :contains("is curious"), :contains("wall")')) {
        $(this).css('display', 'none');
      }
    });
  });
}

$( document ).ready(function(){
  misanthropeAGoGo();
});

var observer = new MutationObserver(function(mutations) {
	
	mutations.forEach(function(mutation) {
		 misanthropeAGoGo();
	});    
});

var observerConfig = {
	attributes: true, 
	childList: true, 
    subtree: true, 
	characterData: true 
};

var targetNode = document.body;
observer.observe(targetNode, observerConfig);