D is wrong but also right but also wrong but most importantly I'm right but also wrong I guess?
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2066991942
commit
377a549d17
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ export default function userscript(root: HTMLElement, docname: string): void {
|
||||||
// The cast to Array is necessary because, while childNodes's NodeList technically has a forEach method, it's a live list and operations mess with its lenght in the middle of the loop.
|
// The cast to Array is necessary because, while childNodes's NodeList technically has a forEach method, it's a live list and operations mess with its lenght in the middle of the loop.
|
||||||
// Nodes can only have one parent so append removes them from the original NodeList and shifts the following one back into the wrong index.
|
// Nodes can only have one parent so append removes them from the original NodeList and shifts the following one back into the wrong index.
|
||||||
Array.from(td.childNodes).forEach((el) => {
|
Array.from(td.childNodes).forEach((el) => {
|
||||||
if (el instanceof Element && el.tagName === "P") {
|
if (el instanceof HTMLParagraphElement) {
|
||||||
tmp.append(...el.childNodes);
|
tmp.append(...el.childNodes);
|
||||||
} else {
|
} else {
|
||||||
tmp.append(el);
|
tmp.append(el);
|
||||||
|
|
Reference in a new issue