MAL Overall Rating Fix

Puts the overall ratings of reviews back to the top.

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         MAL Overall Rating Fix
// @version      1
// @author       ateks
// @namespace    https://greasyfork.org/users/959296
// @description  Puts the overall ratings of reviews back to the top.
// @match        https://myanimelist.net/*
// @run-at       document-end
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
  "use strict";
    function container(score) {
      var temp = document.createElement("template");
      temp.innerHTML = "<div class='floatRightHeader'><a>Overall Rating</a>: " + score + "</div>";
      return temp.content.firstChild;
    }
    var reviews = document.querySelectorAll(".review-element");
    reviews.forEach((review) => {
      var header = review.querySelector(".tags");
      var score = review.querySelector(".rating > .num").textContent;
      header.appendChild(container(score));
    })
})();