mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-10 17:02:54 +01:00
Remove wp-smiley images
This commit is contained in:
parent
1b6ec8cfd7
commit
38827a8c2a
@ -154,6 +154,13 @@ function styleLocalFootnotes() {
|
||||
}
|
||||
}
|
||||
|
||||
// convert <img alt="📰" src="[...]" class="wp-smiley"> to a text node containing 📰
|
||||
function removeWpSmiley() {
|
||||
for (const img of document.querySelectorAll("img.wp-smiley[alt]")) {
|
||||
img.parentNode.replaceChild(document.createTextNode(img.alt), img);
|
||||
}
|
||||
}
|
||||
|
||||
function processPage() {
|
||||
wrapFrames();
|
||||
wrapTables();
|
||||
@ -163,5 +170,6 @@ function processPage() {
|
||||
convertImgSrc();
|
||||
flattenPreElements();
|
||||
styleLocalFootnotes();
|
||||
removeWpSmiley()
|
||||
postRenderProcessing();
|
||||
}
|
||||
|
@ -257,6 +257,7 @@ blockquote {
|
||||
border-top: 1px solid var(--header-table-border-color);
|
||||
}
|
||||
|
||||
/* see removeWpSmiley; this rule is kept in case a wp-smiley is encountered without alt text */
|
||||
.wp-smiley {
|
||||
height: 1em;
|
||||
max-height: 1em;
|
||||
|
Loading…
Reference in New Issue
Block a user