Skip to content

Commit

Permalink
fix: 10 Willpower in hover now displays correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
silentjames committed Dec 18, 2024
1 parent 9938600 commit 7b2690e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
16 changes: 9 additions & 7 deletions js/WoDCharsheets-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1735,15 +1735,17 @@ sleep(200).then(() => {
// same code, but for hover
if (document.querySelector(statblockCSSpathHover + '.willpower-block .line.willpower_main') != null) {
for (let i = 0; i < willpowerOptions.length; i++) {
var willpowerValue = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p');
if (willpowerValue != null) {
if (willpowerValue.innerHTML == 10) {
document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p').innerHTML = 'X'
if (document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p') != null) {
var willpowerValueHover = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p');
if (willpowerValueHover != null) {
if (willpowerValueHover.innerHTML == 10) {
document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p').innerHTML = 'X'
}
}
}
else {
willpowerValue = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result');
if (willpowerValue.innerHTML == 10) {
if (document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result') != null) {
var willpowerValueHover = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result').innerHTML;
if (willpowerValueHover == 10) {
document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result').innerHTML = 'X'
};
}
Expand Down
18 changes: 10 additions & 8 deletions js/WoDCharsheets.js
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ sleep(200).then(() => {
}
// ищем дайс роллер
if (document.querySelector(activeTab + willpowerOptions[i] + ' .dice-roller-result') != null) {
// если оно есть
// если он есть
var willpowerValue = document.querySelector(activeTab + willpowerOptions[i] + ' .dice-roller-result').innerHTML;
if (willpowerValue == 10) {
// меняем десятку на X
Expand All @@ -1578,15 +1578,17 @@ sleep(200).then(() => {
// то же самое, но для ховера
if (document.querySelector(statblockCSSpathHover + '.willpower-block .line.willpower_main') != null) {
for (let i = 0; i < willpowerOptions.length; i++) {
var willpowerValue = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p');
if (willpowerValue != null) {
if (willpowerValue.innerHTML == 10) {
document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p').innerHTML = 'X'
if (document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p') != null) {
var willpowerValueHover = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p');
if (willpowerValueHover != null) {
if (willpowerValueHover.innerHTML == 10) {
document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' p').innerHTML = 'X'
}
}
}
else {
willpowerValue = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result');
if (willpowerValue.innerHTML == 10) {
if (document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result') != null) {
var willpowerValueHover = document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result').innerHTML;
if (willpowerValueHover == 10) {
document.querySelector(statblockCSSpathHover + willpowerOptions[i] + ' .dice-roller-result').innerHTML = 'X'
};
}
Expand Down

0 comments on commit 7b2690e

Please sign in to comment.