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() {
|
function processPage() {
|
||||||
wrapFrames();
|
wrapFrames();
|
||||||
wrapTables();
|
wrapTables();
|
||||||
@ -163,5 +170,6 @@ function processPage() {
|
|||||||
convertImgSrc();
|
convertImgSrc();
|
||||||
flattenPreElements();
|
flattenPreElements();
|
||||||
styleLocalFootnotes();
|
styleLocalFootnotes();
|
||||||
|
removeWpSmiley()
|
||||||
postRenderProcessing();
|
postRenderProcessing();
|
||||||
}
|
}
|
||||||
|
@ -257,6 +257,7 @@ blockquote {
|
|||||||
border-top: 1px solid var(--header-table-border-color);
|
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 {
|
.wp-smiley {
|
||||||
height: 1em;
|
height: 1em;
|
||||||
max-height: 1em;
|
max-height: 1em;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user