Pornhub Blacklister

Delete unwanted pornhub.com videos with a list a blacklisted keywords (see code for the list)

2022/03/24のページです。最新版はこちら。

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。

// ==UserScript==
// @name         Pornhub Blacklister
// @version      0.3
// @description  Delete unwanted pornhub.com videos with a list a blacklisted keywords (see code for the list)
// @author       J.H
// @include      *pornhub.com*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=pornhub.com
// @grant        none
// @license MIT
// @run-at       document-end
// @namespace https://greasyfork.org/users/448067
// ==/UserScript==

let blackList = [
    "trap", "futa", "trans", "shemale", "mom", "sister", "tranny", "mother",
    "rape", "daughter", "daddy", "stepbro", "stepsis", "step bro", "step sis",
    "step-bro", "step-sis",
];
// select all elements with class "videoBox"
let div = document.querySelectorAll(".videoBox");

// loop through all elements and find the first <a> element, and print the data-title attribute
for (var i = 0; i < div.length; i++) {
    let videoTitle = div[i].querySelector("a").getAttribute("data-title");
    // if videoTitle isn't null
    if (videoTitle != null) {
        // check if videoTitle contains any of the blacklisted words
        for (var j = 0; j < blackList.length; j++) {
            // if videoTitle contains blacklisted word
            if (videoTitle.toLowerCase().includes(blackList[j])) {
                // remove the element
                div[i].remove();
                console.log(
                    '%c[Pornhub Blacklister]%c: ' + videoTitle + ' %c[removed]', // Console Message
                    'color: red',
                    'color: white',
                    'color: red', // CSS Style
                    );
            }
        }
    }
}