adds color to name in results
All checks were successful
CI / deploy (push) Successful in 4m17s
CI / deploy (pull_request) Successful in 4m16s

This commit is contained in:
Arindy
2025-02-10 00:42:20 +01:00
parent 001a35165a
commit ce1f43fe98
3 changed files with 4 additions and 3 deletions

View File

@@ -30,7 +30,7 @@
resultText += '<br/>&ensp; D' + result.sides + ': [' + values.map(value => value === 1 ? '<strong style="color: red">' + value + '</strong>' : value === result.sides ? '<strong style="color: green">' + value + '</strong>' : value).join(' + ') + (result.modifier > 0 ? ' <a style="text-decoration: underline">+' + result.modifier + '</a>': result.modifier < 0 ? ' <a style="text-decoration: underline">' + result.modifier + '</a>': '') + '] = <strong style="font-size: x-large">' + result.value + '</strong> '
})
}
node.innerHTML = '<strong>' + data.name + ':</strong> &#127922; ' + resultText
node.innerHTML = '<strong style="text-shadow: 2px 2px 10px ' + data.themeColor + ';">' + data.name + ':</strong> &#127922; ' + resultText
name.appendChild(node)
document.getElementById('results').appendChild(name);
})