FurAffinity YCH/Comission submission hide and remove

Clear out those fucking useless YCH/AUCTION/REMINDER/ETC submissions

23.01.2019 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         FurAffinity YCH/Comission submission hide and remove
// @namespace    https://greasyfork.org/en/scripts/375466-furaffinity-ych-comission-submission-hide-and-remove
// @version      1.3
// @description  Clear out those fucking useless YCH/AUCTION/REMINDER/ETC submissions
// @author       SomeAnnoyedFAUser
// @match        http://www.furaffinity.net/msg/submissions/*
// @require      http://code.jquery.com/jquery-latest.js
// ==/UserScript==

(function() {
    'use strict';
    var jQuery = window.jQuery;											//Need for Tampermonkey or it raises warnings...

    var keywordsToRemove = ["ych","auction","reminder","stream"];	                        //The words being searched for..
    var noOfKeywordsToCheck = keywordsToRemove.length;					//The number of keywords, this is used to loop over so we check every single one...
    var keywordIterator = 0;											//We start our checks at the zeroeth keyword
    var blacklistedWord = "";											//Holds keyword being searched for

    var submissionList = jQuery( "figcaption" );						//A list of all the submission items on the page, this contains the text only, not the images...
    var noOfSubmissionsToCheck = submissionList.length;					//The number of submissions, this is used to loop over so we check every single one...
    var submissionIterator = 0;											//We start our checks at the zeroeth submissions
    var currText = "";													//Holds text of submission being checked

    for (submissionIterator; submissionIterator < noOfSubmissionsToCheck; submissionIterator++)				//Loops over all of the submissions
    {
        currText = submissionList.eq(submissionIterator).text();											//Text of current submission
        console.log("Currently checking "+currText);														//Prints out currently being checked submission
        keywordIterator = 0;																				//Resets it, so the next submission is checked against the keywords

        for (keywordIterator; keywordIterator < noOfKeywordsToCheck; keywordIterator++)						//Loops over all of the submissions
        {
            blacklistedWord = keywordsToRemove[keywordIterator];											//Gets word to check based on loop iteration
            console.log("Checking for blacklisted word "+blacklistedWord);									//Prints it to the console for clarity
            if (currText.toLowerCase().includes(blacklistedWord))											//If the current submission has a blacklisted word
            {
                console.log("The submission "+currText+" contains the blacklisted word "+blacklistedWord);	//Indicate that in the console
				submissionList.eq(submissionIterator).parent().find(":checkbox").prop('checked', true);		//Ticks the checkbox so when you click "Remove checked" it is removed
				submissionList.eq(submissionIterator).parent().hide()										//Hides it from the page
                console.log("It has been ticked, and hidden from the page. Happy browsing!");				//Indicate that it has been DESTROYED in the console
            }
        }//End of keyword loop
    }//End of submission loop
})();