Event placement on achievement icons

Место в рейтинге отображается на ачивках

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Event placement on achievement icons
// @namespace    http://tampermonkey.net/
// @version      0.1.2
// @description  Место в рейтинге отображается на ачивках
// @author       Something begins
// @match        https://www.heroeswm.ru/pl_info.php*
// @match        https://my.lordswm.com/pl_info.php*
// @match        https://lordswm.com/pl_info.php*
// @license      trust me bro
// @icon         https://www.google.com/s2/favicons?sz=64&domain=heroeswm.ru
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

for (const achievement of document.querySelectorAll(".t_noselect")){
    const text = achievement.getAttribute("hint");
    if (!text) continue;
    let placement = text.replace(/,/g, "").match(/есто в рейтинге - (\d+)/);
    if (!placement) continue;
    placement = placement[1];
    achievement.insertAdjacentHTML("beforeend", `<div align="center" valign="middle" style="font-weight: bold; color: white; margin:0px; background-repeat: no-repeat; width: 20px; height:15px; left:15px; top:35px; position:absolute; text-shadow: 4px 4px 8px blue;">
  ${placement}
</div>
`)
}

})();