From aafffd6c0b09167f57f2cdec638e10a3ebb011bc Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 29 Nov 2023 16:06:31 +0000 Subject: [PATCH] fix a issue --- css/custom-css.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/css/custom-css.js b/css/custom-css.js index 91e3603..b91227d 100644 --- a/css/custom-css.js +++ b/css/custom-css.js @@ -27,12 +27,14 @@ document.head.appendChild(script_tag); /* rebranding */ function replaceRecursively(element, from, to) { + if (element.tagName !== 'STYLE') { // Ignore elements with the tag name "style" if (element.childNodes.length) { element.childNodes.forEach(child => replaceRecursively(child, from, to)); } else { const cont = element.textContent; if (cont) element.textContent = cont.replace(from, to); - } + } } + }; document.title = document.title.replace("PokeTube", "Poke")