Remove annoying intoductory img from task assignment
This commit is contained in:
parent
0b3d59cfa1
commit
b3f809a116
1 changed files with 6 additions and 0 deletions
|
@ -103,6 +103,12 @@ function parseTask(startElementId: string, doc: HTMLDocument): TaskAssignmentDat
|
|||
e = e.nextElementSibling as HTMLElement
|
||||
}
|
||||
|
||||
// hack: remove img tag that shows this task is a practical one. Some tasks have it, some don't, so we remove it for consistency
|
||||
const intoImgTag = elements[0]?.firstElementChild
|
||||
if (intoImgTag && intoImgTag.tagName.toLowerCase() == "img" && intoImgTag.classList.contains("leftfloat")) {
|
||||
intoImgTag.remove()
|
||||
}
|
||||
|
||||
let r = ""
|
||||
for (const e of elements) {
|
||||
fixAllLinks(e)
|
||||
|
|
Reference in a new issue