Combat Helper

Track Status in dndbeyond

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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);
}