Greasy Fork Content Filter

Filter out unwanted content on Greasy Fork

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

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