in unexpanded mode unpack article only when activated
This commit is contained in:
parent
9e83fcb9f4
commit
32d36d439c
|
@ -1114,6 +1114,15 @@ function setActiveArticleId(id) {
|
||||||
const row = $("RROW-" + id);
|
const row = $("RROW-" + id);
|
||||||
|
|
||||||
if (row) {
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
if (row.hasClassName("Unread")) {
|
if (row.hasClassName("Unread")) {
|
||||||
toggleUnread(id, 0);
|
toggleUnread(id, 0);
|
||||||
|
|
||||||
|
@ -1147,7 +1156,7 @@ function postMouseOut(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function unpackVisibleHeadlines() {
|
function unpackVisibleHeadlines() {
|
||||||
if (!isCdmMode()) return;
|
if (!isCdmMode() || !getInitParam("cdm_expanded")) return;
|
||||||
|
|
||||||
const rows = $$("#headlines-frame div[id*=RROW][data-content]");
|
const rows = $$("#headlines-frame div[id*=RROW][data-content]");
|
||||||
const threshold = $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight + 300;
|
const threshold = $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight + 300;
|
||||||
|
|
Loading…
Reference in New Issue