Episodes Average Score - MAL

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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
})();