您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Calculates the foals potential GP stats on the mare's covering confirmation page, and displays it at the bottom below the confirmation button.
// ==UserScript== // @name Howrse Foal's GP Calculator // @namespace myHowrse // @description Calculates the foals potential GP stats on the mare's covering confirmation page, and displays it at the bottom below the confirmation button. // @include http://*.howrse.com/elevage/chevaux/saillie?* // @author daexion // @version 1 // ==/UserScript== setTimeout(getCompetenceStuff,1000); function getCompetenceStuff() { competenceList = document.getElementsByClassName("competence"); var horses = [[,]]; var statNames = []; statNames[0] = "Stamina"; statNames[1] = "Speed"; statNames[2] = "Dressage"; statNames[3] = "Gallop"; statNames[4] = "Trot"; statNames[5] = "Jumping"; for(i = 0;i < competenceList.length;++i) { ttComp = competenceList[i].getAttribute("onmouseover"); for(j = 0;j < 6;++j) { ttComp = ttComp.substring(ttComp.indexOf("<strong"),ttComp.length); ttComp = ttComp.substring(ttComp.indexOf(">") + 1,ttComp.length); horses[[i,j]] = parseFloat(ttComp.substring(0,ttComp.indexOf("<"))); } } for(j = 0;j < 6;++j) { horses[[2,j]] = (horses[[0,j]] + horses[[1,j]])/2; horses[[3,j]] = 10 + horses[[2,j]] * 1.2; } divAttachto = document.getElementById("page-contents"); newDiv = document.createElement("div"); newDiv.textContent = "Potential Foal's GP"; divAttachto.appendChild(newDiv); foalGP = 0; for(j = 0;j < 6;++j) foalGP += horses[[2,j]]; newDiv = document.createElement("div"); newDiv.textContent = "GP : " + foalGP.toFixed(2); divAttachto.appendChild(newDiv); newDiv = document.createElement("div"); newDiv.textContent = "-------------------------------"; divAttachto.appendChild(newDiv); for(j = 0;j < 6;++j) { newDiv = document.createElement("div"); newDiv.textContent = statNames[j] + " : " + horses[[2,j]].toFixed(2); divAttachto.appendChild(newDiv); } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址