mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-05 11:48:10 +00:00
Use classList instead of string manipulation
This commit is contained in:
1 parent
afdfe5fe71
commit
183d703fd3
1 file changed
+1
-6
@@ -117,12 +117,7 @@ function isLocalFootnote(target) {
|
||||
function styleLocalFootnotes() {
|
||||
for (elem of document.querySelectorAll("sup > a[href*='#fn'], sup > div > a[href*='#fn']")) {
|
||||
if (isLocalFootnote(elem)) {
|
||||
if (elem.className.indexOf("footnote") === -1) {
|
||||
if (elem.className.length === 0)
|
||||
elem.className = "footnote";
|
||||
else
|
||||
elem.className = elem.className + " " + "footnote";
|
||||
}
|
||||
elem.classList.add("footnote");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user