Greasy Fork Content Filter

Filter out unwanted content on Greasy Fork

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 or Violentmonkey 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        Greasy Fork Content Filter
// @namespace   https://openuserjs.org/
// @description Filter out unwanted content on Greasy Fork
// @include     http*://greasyfork.org/en/scripts*
// @version     1.0
// @grant       GM_addStyle
// ==/UserScript==

GM_addStyle(".width-constraint {max-width: 1180px !important}");

var entrytitles = ["Agar.io", "OGARio", "Slither.io", "Diep.io"];

var nodes = document.evaluate("//ol[@class='script-list']/li/article/h2/a | //ol[@class='script-list']/li/article/h2/span[@class='description']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

for (var i = 0; i < nodes.snapshotLength; i++) {
	var curScript = nodes.snapshotItem(i).textContent.toString();
	for (var j = 0; j < entrytitles.length; j++) {
		var x = new RegExp("\\b" + entrytitles[j] + "\\b", "gi");
		if (curScript.match(x)) {
			nodes.snapshotItem(i).parentNode.parentNode.parentNode.style.display = 'none';
			break;
		}
	}
}