mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 03:28:35 +01:00
fix a issue
This commit is contained in:
parent
a1387cd434
commit
aafffd6c0b
1 changed files with 3 additions and 1 deletions
|
@ -27,12 +27,14 @@ document.head.appendChild(script_tag);
|
||||||
|
|
||||||
/* rebranding */
|
/* rebranding */
|
||||||
function replaceRecursively(element, from, to) {
|
function replaceRecursively(element, from, to) {
|
||||||
|
if (element.tagName !== 'STYLE') { // Ignore elements with the tag name "style"
|
||||||
if (element.childNodes.length) {
|
if (element.childNodes.length) {
|
||||||
element.childNodes.forEach(child => replaceRecursively(child, from, to));
|
element.childNodes.forEach(child => replaceRecursively(child, from, to));
|
||||||
} else {
|
} else {
|
||||||
const cont = element.textContent;
|
const cont = element.textContent;
|
||||||
if (cont) element.textContent = cont.replace(from, to);
|
if (cont) element.textContent = cont.replace(from, to);
|
||||||
}
|
} }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
document.title = document.title.replace("PokeTube", "Poke")
|
document.title = document.title.replace("PokeTube", "Poke")
|
||||||
|
|
Loading…
Reference in a new issue