mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2036 from omnivore-app/fix/remove-footnote-links
Remove footnote links in wikipedia articles
This commit is contained in:
commit
7444d32944
1 changed files with 4 additions and 0 deletions
|
|
@ -13,6 +13,10 @@ export class WikipediaHandler extends ContentHandler {
|
|||
async preParse(url: string, dom: Document): Promise<Document> {
|
||||
// This removes the [edit] anchors from wikipedia pages
|
||||
dom.querySelectorAll('.mw-editsection').forEach((e) => e.remove())
|
||||
|
||||
// Remove footnotes
|
||||
dom.querySelectorAll('sup[class="reference"]').forEach((e) => e.remove())
|
||||
|
||||
// this removes the sidebar
|
||||
dom.querySelector('.infobox')?.remove()
|
||||
return Promise.resolve(dom)
|
||||
|
|
|
|||
Loading…
Reference in a new issue