mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Replace Element.fromHTML() with createElement()
This commit is contained in:
parent
820b26a315
commit
415102aa37
3 changed files with 15 additions and 12 deletions
|
|
@ -18,7 +18,8 @@ const
|
|||
SettingsUserStore.collapseBlockquotes() &&
|
||||
// tpl.content.querySelectorAll('blockquote').forEach(node => {
|
||||
[...tpl.content.querySelectorAll('blockquote')].reverse().forEach(node => {
|
||||
const el = Element.fromHTML('<details class="sm-bq-switcher"><summary>•••</summary></details>');
|
||||
const el = createElement('details', {class:'sm-bq-switcher'});
|
||||
el.innerHTML = '<summary>•••</summary>';
|
||||
node.replaceWith(el);
|
||||
el.append(node);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -310,11 +310,13 @@ populateMessageBody = (oMessage, popup) => {
|
|||
oMessage.isHtml(body.classList.contains('html'));
|
||||
oMessage.hasImages(body.rlHasImages);
|
||||
} else {
|
||||
body = Element.fromHTML('<div id="' + id + '" hidden="" class="b-text-part '
|
||||
+ (oMessage.pgpSigned() ? ' openpgp-signed' : '')
|
||||
+ (oMessage.pgpEncrypted() ? ' openpgp-encrypted' : '')
|
||||
+ '">'
|
||||
+ '</div>');
|
||||
body = createElement('div',{
|
||||
id:id,
|
||||
hidden:'',
|
||||
class:'b-text-part'
|
||||
+ (oMessage.pgpSigned() ? ' openpgp-signed' : '')
|
||||
+ (oMessage.pgpEncrypted() ? ' openpgp-encrypted' : '')
|
||||
});
|
||||
oMessage.body = body;
|
||||
if (!SettingsUserStore.viewHTML() || !oMessage.viewHtml()) {
|
||||
oMessage.viewPlain();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue