From b571b24828b533030b11fb270f86f78abbd88d9d Mon Sep 17 00:00:00 2001 From: Stanimir Stamenkov Date: Sun, 6 May 2018 19:01:25 +0300 Subject: [PATCH] Auto-update qctoggled="true" of nested quotes on expand Detect fully revealed "partially collapsed" quotes on expand making it immediately obvious they are already completely visible. --- src/chrome/content/quotecollapse/quotecollapse.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/chrome/content/quotecollapse/quotecollapse.js b/src/chrome/content/quotecollapse/quotecollapse.js index 8032234..3c391a3 100644 --- a/src/chrome/content/quotecollapse/quotecollapse.js +++ b/src/chrome/content/quotecollapse/quotecollapse.js @@ -186,8 +186,13 @@ blockquote[type="cite"][qctoggled="true"] {\n\ else if(event.ctrlKey || event.metaKey) QuoteCollapse._setLevel(target, newstate); - else + else { QuoteCollapse._setState(target, newstate, newstate); + if(newstate) + for(let nested of target.querySelectorAll("blockquote")) { + QuoteCollapse._toggleFullyVisible(nested); + } + } return true; }, -- 2.11.4.GIT