From 968270ed486a3f8330520b95b142908758ad8bd7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Mar 2021 19:28:20 +0300 Subject: fix excessive CPU usage on linux chromium caused by animated SVG icons --- js/Article.js | 4 ++-- js/Headlines.js | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/Article.js b/js/Article.js index 5f882a59f..16abfbfee 100644 --- a/js/Article.js +++ b/js/Article.js @@ -283,8 +283,8 @@ const Article = { row.setAttribute("data-content", row.getAttribute("data-content-original")); row.removeAttribute("data-content-original"); - row.querySelector(".content-inner").innerHTML = `
- + row.querySelector(".content-inner").innerHTML = `
+ ${__("Loading, please wait...")}
` } }, diff --git a/js/Headlines.js b/js/Headlines.js index 2e19d54f2..134bdad6d 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -533,8 +533,8 @@ const Headlines = {
${Article.renderNote(hl.id, hl.note)}
-
- +
+ ${__("Loading, please wait...")}
@@ -749,6 +749,9 @@ const Headlines = { hsp.id = "headlines-spacer"; } + // clear out hsp contents in case there's a power-hungry svg icon rotating there + hsp.innerHTML = ""; + dijit.byId('headlines-frame').domNode.appendChild(hsp); this.initHeadlinesMenu(); @@ -800,6 +803,9 @@ const Headlines = { hsp.id = "headlines-spacer"; } + // clear out hsp contents in case there's a power-hungry svg icon rotating there + hsp.innerHTML = ""; + c.domNode.appendChild(hsp); this.initHeadlinesMenu(); -- cgit v1.2.3