MAL highlight active users

Highlight active users to help find friends in your area for MyAnimeList: https://myanimelist.net/users.php

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ć!)

Advertisement:

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ć!)

Advertisement:

// ==UserScript==
// @name         MAL highlight active users
// @namespace    https://greasyfork.org/en/users/715572-falzar-fz
// @version      1
// @description  Highlight active users to help find friends in your area for MyAnimeList: https://myanimelist.net/users.php
// @author       Falzar FZ
// @match        *://myanimelist.net/users.php*
// @license      MIT
// ==/UserScript==

(function() {
    function search() {
        let elements = document.querySelectorAll(".borderClass");
        elements.forEach(function(val) {
            if (/,\s20\d{2}/.test(val.textContent)) {
                val.style.opacity = '0.2';
            }
            if (val.textContent.includes("day")) {
                val.style.backgroundColor = 'blue';
            }
            if (val.textContent.includes(" ago")) {
                val.style.backgroundColor = 'green';
            }
        });
    }

    search();
})();