Hide Annoying Charters

1/3/2024, 11:46:03 PM

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Hide Annoying Charters
// @match       https://www.enchor.us/*
// @version     0.2
// @namespace   MNM
// @author      MNM
// @require https://update.greasyfork.org/scripts/471409/1232035/Arrive.js
// @require     https://code.jquery.com/jquery-3.7.1.js
// @description 1/3/2024, 11:46:03 PM
// @license MIT
// ==/UserScript==
document.arrive("ce-search-result-chart", function(newElem) {
  if(document.querySelectorAll('ce-search-result[class="card bg-base-100 shadow-xl rounded-none"]').length < 100){
    window.scrollTo(0, document.body.scrollHeight);
  }else{
    $('ce-search-result > ce-search-result-chart:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > img:nth-child(1)').each(function(){
      annoyingcharter = $(this).attr("alt");
      if(annoyingcharter == "misc"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharter == "cth3dlc"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharter == "csc"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharter == "marathonhero2"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharter == "cth3"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharter == "antihero2"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharter == "s_hero"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharter == "rbn"){
        $(this).parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      };
    });
    $('ce-search-result > ce-search-result-chart:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > a:nth-child(2)').each(function(){
      annoyingcharters = $(this).text();
      if(annoyingcharters.includes("Miscellany") == true){
        $(this).parent().parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharters.includes("Tolberto") == true){
        $(this).parent().parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      }else if(annoyingcharters.includes("Harmonix") == true){
        $(this).parent().parent().parent().parent().parent().parent().parent().attr("style","display: none;");
      };
    });
  };
});
setTimeout(function(){
  window.scrollTo(0, 0);
},8000);