5,960
edits
No edit summary |
No edit summary |
||
Line 1,781: | Line 1,781: | ||
<references /> | <references /> | ||
<div style="position: fixed; top: 80%; right: 2em; background-color: white; border: 1px solid black; border-radius: 2em; padding: 0.5em 1em; cursor: pointer;" onclick="toggleHighlight()">Highlight italics</div> | |||
<html> | |||
<script> | |||
function toggleHighlight() { | |||
const div = document.getElementById("mw-parser-output"); | |||
const nodes = x.getElementsByTagName("I"); | |||
for (let i = 0; i < nodes.length; i++) { | |||
nodes[i].style.backgroundColor = "yellow"; | |||
} | |||
} | |||
</script> | |||
</html> |