From 407becbb6d9c6cfdfff78fd315d177639faa0fe3 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Tue, 6 Dec 2022 18:57:50 -0800 Subject: [PATCH] Fix kyujitai links --- themes/tegakituesday.com/static/js/toggle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/tegakituesday.com/static/js/toggle.js b/themes/tegakituesday.com/static/js/toggle.js index 7387224..932d638 100644 --- a/themes/tegakituesday.com/static/js/toggle.js +++ b/themes/tegakituesday.com/static/js/toggle.js @@ -24,7 +24,7 @@ for (let i = 0; i < rubies.length; i++) { ruby.shinjitai = pair[0]; ruby.kyujitai = pair[1]; const encodedURIComponent = encodeURIComponent(pair[0]).toLowerCase(); - if (ruby.parentNode.nodeName === "a" && ruby.parentNode.href.includes(encodedURIComponent) && ruby.parentNode.href.endsWith("%23kanji")) { + if (ruby.parentNode.nodeName === "A" && ruby.parentNode.href.includes(encodedURIComponent) && ruby.parentNode.href.endsWith("%23kanji")) { ruby.parentNode.shinjitaiHref = ruby.parentNode.href; ruby.parentNode.kyujitaiHref = ruby.parentNode.href.replace(encodedURIComponent, encodeURIComponent(pair[1])); kyujitaiConvertableLinks.push(ruby.parentNode);