pornhub title filter

This script filters out pornhub videos containing certain keywords.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name     pornhub title filter
// @namespace     pornhub_title_filter
// @version  1
// @description This script filters out pornhub videos containing certain keywords.
// I got tired of 'step' titles on pornhub, but you can adapt the filter as you see fit.
// Source https://github.com/nsfw-free-software/pornhub_filter_step
// @license WTFPLv2
// @grant    none
// @match https://www.pornhub.com/*
// ==/UserScript==

re = /step|hermanastra/i;

// filters homepage
matchs = document.querySelectorAll(".thumbnailTitle");
matchs.forEach(e => {
  if(e.innerText.match(re)){
		e.parentElement.parentElement.parentElement.parentElement.parentElement.remove()
  }
});

// filters other pages, eg a category page
matchs = document.querySelectorAll(".gtm-event-thumb-click");
matchs.forEach(e => {
  if(e.innerText.match(re)){
		e.parentElement.parentElement.parentElement.parentElement.remove()
  }
});