Greasy Fork 还支持 简体中文。

Pinterest - Remove "Picked for You" completely

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

Pada tanggal 24 Juli 2015. Lihat %(latest_version_link).

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
// @description Remove "Picked For You" and "Sponsored" pins on your Pinterest home page
// @version 0.1.2
// @include https://www.pinterest.com
// @grant none
// @compatible Firefox with GreaseMonkey
// @namespace https://greasyfork.org/users/13594
// ==/UserScript==

function HideNodeIfDecendantFound(node, decendantSelector)
{
	var target = node.querySelector(decendantSelector);
	if (target)
	{
		// Removes the offending pins
		node.remove();
	}
}

// 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);
}