Episodes Average Score - MAL

Shows the total episodes average score on any anime entries on MAL.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Episodes Average Score - MAL
// @namespace    AverageEPScore
// @version      1
// @description  Shows the total episodes average score on any anime entries on MAL.
// @author       hacker09
// @match        https://myanimelist.net/*/*/*/episode
// @icon         https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://myanimelist.net&size=64
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  document.querySelector(".episode-title").innerText += ' (Total episodes average score ' + ([...document.querySelectorAll("span.value")].map(row => row.innerText).filter(Boolean).map(i => Number(i)).reduce((a, b) => a + b) / [...document.querySelectorAll("span.value")].map(row => row.innerText).length).toFixed(2) + ') (' + (([...document.querySelectorAll("span.value")].map(row => row.innerText).filter(Boolean).map(i => Number(i)).reduce((a, b) => a + b) / [...document.querySelectorAll("span.value")].map(row => row.innerText).length) * 100 / 5).toFixed(2) + '%)'; //Show the Average Score results
})();