您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show price of one battle on auction page
// ==UserScript== // @name [HWM] OneBattleAuctionPrice // @namespace [HWM] OneBattleAuctionPrice // @version 0.2 // @description Show price of one battle on auction page // @author Komdosh // @include http*://*.heroeswm.ru/auction.php* // @grant none // @license MIT // ==/UserScript== var arts = Array.from(document.querySelectorAll("tr[bgcolor].wb")); if(arts==null){ return; } for(var artIdx = 0; artIdx< arts.length; ++artIdx){ var artDom = arts[artIdx]; var cost = parseInt(artDom.querySelectorAll("td")[4].innerText.trim().replaceAll(',', '')); var artDescDom = artDom.querySelector("td[valign]"); var artDesc = artDescDom.innerText.split("\n").find(it=>/\//.test(it)); var durability = parseInt(artDesc.split(" ")[1].split("/")[0]); var infoSpan = document.createElement('span'); infoSpan.style = 'font-size: 8px; color: #21211D'; infoSpan.innerText = ' ('+Math.ceil(cost/durability)+')'; artDescDom.append(infoSpan); }