summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-10 15:06:47 +0300
committerAndrew Dolgov <[email protected]>2018-12-10 15:06:47 +0300
commit54f02a3b311c6ffa676fde17c49edd91de751747 (patch)
tree5546217f4986691b058226154bda86529960cd6f /js/Article.js
parent7915706946f2881f5ba82651cb58bbabf15728a8 (diff)
add Headlines.renderAgain() to switch between combined/expanded modes faster
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/js/Article.js b/js/Article.js
index c3b6766c8..235865394 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -160,6 +160,16 @@ define(["dojo/_base/declare"], function (declare) {
${__('Originally from:')} <a target="_blank" rel="noopener noreferrer" href="${hl.orig_feed[1]}">${hl.orig_feed[0]}</a>
</span>` : "";
},
+ unpack: function(row) {
+ if (row.hasAttribute("data-content")) {
+ console.log("unpacking: " + row.id);
+
+ row.select(".content-inner")[0].innerHTML = row.getAttribute("data-content");
+ row.removeAttribute("data-content");
+
+ PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED_CDM, row);
+ }
+ },
view: function (id, noexpand) {
this.setActive(id);
@@ -283,14 +293,7 @@ define(["dojo/_base/declare"], function (declare) {
const row = $("RROW-" + id);
if (row) {
- if (row.hasAttribute("data-content")) {
- console.log("unpacking: " + row.id);
-
- row.select(".content-inner")[0].innerHTML = row.getAttribute("data-content");
- row.removeAttribute("data-content");
-
- PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED_CDM, row);
- }
+ Article.unpack(row);
if (row.hasClassName("Unread")) {