Pinterest - Remove "Picked For You" Completely

Remove "Picked For You" and "Sponsored" pins on your Pinterest home page

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.

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

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

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

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

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

// ==UserScript==
// @name        Pinterest - Remove "Picked For You" Completely
// @namespace   lokowebdesign.com
// @author      loko
// @description Remove "Picked For You" and "Sponsored" pins on your Pinterest home page
// @include     https://www.pinterest.com/
// @version     0.1.5
// @grant       none
// @compatible  firefox Firefox with GreaseMonkey
// ==/UserScript==


function HideNodeIfDecendantFound(node, decendantSelector)
{
	var target = node.querySelector(decendantSelector);
	if (target)
	{
		node.remove().style.display = 'none';
	}
}

// handle dynamically added items
var callback = function(allmutations)
{
	allmutations.map(function(mr)
	{
		for (var i = 0; i < mr.addedNodes.length; i++)
		{
			HideNodeIfDecendantFound(mr.addedNodes[i], '.hidePinInfo + .creditItem .creditName');
		}
	});
}


var pins = document.querySelectorAll('.HomePage .GridItems .item');

for (var i = 0; i < pins.length; ++i)
{
	HideNodeIfDecendantFound(pins[i], '.hidePinInfo + .creditItem .creditName');
}

var observer = new MutationObserver(callback);
var options = {
	// observes additions or deletion of child nodes
	'childList': true,
	// observes addition or deletion of “grandchild” nodes
	'subtree': true
}

var gridItems = document.querySelector('.HomePage .GridItems');

if (gridItems)
{
	// start watching for dynamically added stuff (handled in callback above)
	observer.observe(gridItems, options);
}