Combat Helper

Track Status in dndbeyond

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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