HWM_CardLog

На странице истории карточных игр отображает число "побед/всего игр", процент побед

目前為 2016-03-26 提交的版本,檢視 最新版本

// ==UserScript==
// @name        HWM_CardLog
// @author  Zeleax
// @namespace   Zeleax
// @description На странице истории карточных игр отображает число "побед/всего игр", процент побед
// @include     http://www.heroeswm.ru/pl_cardlog.php?id=*
// @include     http://qrator.heroeswm.ru/pl_cardlog.php?id=*
// @include     http://178.248.235.15/pl_cardlog.php?id=*
// @include     http://www.lordswm.com/pl_cardlog.php?id=*
// @version     1.0
// @grant       none
// ==/UserScript==
var set=getI("//a[@href=(//a[starts-with(@href,'pl_info.php')])[1]/@href]");
var wins=0;
for(var i=1;el=set.snapshotItem(i);i++) if(el.childNodes[0].tagName=='B')wins++;
set.snapshotItem(0).insertAdjacentHTML("afterEnd", '<br>'+'Побед: '+wins+'/'+(set.snapshotLength-1)+' ('+Math.round(100*wins/(set.snapshotLength-1))+'%)');

function getI(xpath,elem){return document.evaluate(xpath,(!elem?document:elem),null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址