Greasy Fork is available in English.

[HWM] countMonstersArts

Подсчёт количества наноартов

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 or Violentmonkey 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         [HWM] countMonstersArts
// @version      0.10.0
// @description  Подсчёт количества наноартов
// @author       Komdosh
// @match        http*://*.heroeswm.ru/arts_for_monsters.php*
// @grant        none
// @namespace https://greasyfork.org/users/13829
// ==/UserScript==

var headers = Array.from(document.querySelectorAll("td>b, td>a")).slice(0,9);
var count = 0;

for (var header of headers){
   count+=parseInt(header.innerHTML.split('(')[1].split(')')[0]);
}

var center = document.querySelector("center > b");
center.innerHTML+="<br>Количество артефактов существ: "+count;


var lsName = 'KomdoshScript_ArtsForMonsterCount';
if(!localStorage.getItem(lsName)){
    localStorage.setItem(lsName, count);
}

if(localStorage.getItem(lsName) && localStorage.getItem(lsName)<count){
    var all = localStorage.getItem('HWMCMA');
    center.innerHTML+=" <font color='green' weight='bold'>+"+(count-all)+"</font>";
    localStorage.setItem('HWMCMA', count);
}