5,960
edits
No edit summary |
No edit summary |
||
Line 1,781: | Line 1,781: | ||
<references /> | <references /> | ||
<html> | |||
<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> | <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> | ||
<script> | <script> | ||
function toggleHighlight() { | function toggleHighlight() { | ||
const div = document.getElementById("mw- | const div = document.getElementById("mw-content-text"); | ||
const nodes = x.getElementsByTagName("I"); | const nodes = x.getElementsByTagName("I"); | ||
for (let i = 0; i < nodes.length; i++) { | for (let i = 0; i < nodes.length; i++) { | ||
nodes[i].style.backgroundColor = " | nodes[i].style.backgroundColor = "#fce59a"; | ||
} | } | ||
} | } | ||
</script> | </script> | ||
</html> | </html> |