From b182372b83a1fb0a9185d3b0b9656a06868d5fd2 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 3 Feb 2023 12:12:40 +0100 Subject: [PATCH] Speedup for #902 --- dev/Common/Html.js | 3 ++- dev/View/User/MailBox/MessageView.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/Common/Html.js b/dev/Common/Html.js index 225bf751a..81759956a 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -22,7 +22,8 @@ const return result; }, blockquoteSwitcher = () => { - tpl.content.querySelectorAll('blockquote').forEach(node => { +// tpl.content.querySelectorAll('blockquote').forEach(node => { + [...tpl.content.querySelectorAll('blockquote')].reverse().forEach(node => { let h = node.clientHeight || getRealHeight(node); if (0 === h || 100 < h) { const el = Element.fromHTML('
•••
'); diff --git a/dev/View/User/MailBox/MessageView.js b/dev/View/User/MailBox/MessageView.js index 158040cb6..55eb2aab5 100644 --- a/dev/View/User/MailBox/MessageView.js +++ b/dev/View/User/MailBox/MessageView.js @@ -426,7 +426,7 @@ export class MailMessageView extends AbstractViewRight { registerShortcut('b', '', [Scope.MessageList, Scope.MessageView], () => { const message = currentMessage(); if (message?.body) { - message.body.querySelectorAll('.sm-bq-switcher > summary').forEach(node => node.click()); + message.body.querySelectorAll('details').forEach(node => node.open = !node.open); return false; } });