Update 99_html_footer.html
This commit is contained in:
@@ -3,19 +3,20 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
function colorerMots(element) {
|
||||||
var content = document.getElementById("content");
|
const tds = document.querySelectorAll("td");
|
||||||
var text = content.innerHTML;
|
for (const td of tds) {
|
||||||
|
const text = td.textContent;
|
||||||
|
const motsACouleur = ["Error", "Failed", "COMPLETED"];
|
||||||
|
for (const mot of motsACouleur) {
|
||||||
|
text = text.replace(mot, `<span style="color: red; background-color: yellow;">${mot}</span>`);
|
||||||
|
}
|
||||||
|
td.textContent = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remplacez ici les mots que vous souhaitez mettre en surbrillance
|
const element = document.querySelector("table");
|
||||||
var wordsToHighlight = ["DEFERRED"];
|
colorerMots(element);
|
||||||
|
|
||||||
wordsToHighlight.forEach(function(word) {
|
|
||||||
var regex = new RegExp('\\b(' + word + ')\\b', 'gi');
|
|
||||||
text = text.replace(regex, '<span class="highlight">$1</span>');
|
|
||||||
});
|
|
||||||
|
|
||||||
content.innerHTML = text;
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user