Combat Helper

Track Status in dndbeyond

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey 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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         Combat Helper
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Track Status in dndbeyond
// @author       Xanlantos
// @match        https://www.dndbeyond.com/combat-tracker/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=dndbeyond.com
// @license       https://tldrlegal.com/license/creative-commons-attribution-noncommercial-(cc-nc)#summary
// ==/UserScript==
function locateRightTimeing() {
  if (document.querySelector('.combatant-card__hp')) {
    main();
  } else {
    setTimeout(locateRightTimeing, 100);
  }
}
locateRightTimeing();
function main()
{
    console.log("start extra statuses");
    var combatCards =document.querySelectorAll('.combatant-card');
    console.table(combatCards);
    combatCards.forEach((item, index)=>{
       changeCard(item)
    })
}
function changeCard(card){
    let rightPart = card.querySelector(".combatant-card__right-bit");
    let widthHP = rightPart.querySelector(".combatant-card__hp");
    console.log(widthHP)
    rightPart.style.display = "block";
    const div = document.createElement("div");
    div.style.padding = "8px";
    let field= document.createElement("input");
    field.setAttribute('size', '6');
    field.type = "text";
    div.appendChild(field);
    rightPart.appendChild(div);
}