Skip to content

Commit

Permalink
do not calc CD for goty version
Browse files Browse the repository at this point in the history
  • Loading branch information
pyanderson committed Nov 1, 2023
1 parent fa2b3c3 commit b267e56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/features/character-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,13 @@ function loadSheetEnhancement({ db: data, characterId }) {
equipmentsContainer &&
headerContainer
) {
init({ iframe: iframe.contentDocument, characterId });
calcCD({ iframe: iframe.contentDocument });
const isJDA = iframe.contentDocument.querySelector(
'span[data-i18n="global_charactersheet"]',
);
if (!isJDA) {
init({ iframe: iframe.contentDocument, characterId });
calcCD({ iframe: iframe.contentDocument });
}
loadSpellsEnhancement({ iframe: iframe.contentDocument, data });
loadPowersEnhancement({ iframe: iframe.contentDocument, data });
loadEquipmentEnhancement({ iframe: iframe.contentDocument, data });
Expand Down
2 changes: 1 addition & 1 deletion src/features/powers.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function renderPowerButton({ container, data }) {
);
container.prepend(
createPowerDialog({
options: Object.keys(data?.abilitiesAndPowers || {}),
options: Object.keys(data?.abilities_and_powers || {}),
}),
);
container.style.flexDirection = 'column';
Expand Down

0 comments on commit b267e56

Please sign in to comment.