Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
msangel committed Apr 9, 2024
1 parent ab759dc commit 6b4f198
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions assets/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,38 @@ function pdf_new_window ()
}
pdf_new_window();
external_new_window();


document.addEventListener("DOMContentLoaded", function(){
let xPathResult = document.evaluate(
"//td[contains(., 'yes')]",
document,
null,
XPathResult.ANY_TYPE,
null,
)

let nodes = [];
let node = xPathResult.iterateNext();
while (node) {
nodes.push(node);
node = xPathResult.iterateNext();
}

nodes.forEach(el => {el.style.backgroundColor = '#baeda6'})

xPathResult = document.evaluate(
"//td[contains(., 'no')]",
document,
null,
XPathResult.ANY_TYPE,
null,
)
nodes = [];
node = xPathResult.iterateNext();
while (node) {
nodes.push(node);
node = xPathResult.iterateNext();
}
nodes.forEach(el => {el.style.backgroundColor = '#eda6a6'})
});

0 comments on commit 6b4f198

Please sign in to comment.