summaryrefslogtreecommitdiff
path: root/js/Headlines.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-10-09 13:07:34 +0300
committerAndrew Dolgov <[email protected]>2020-10-09 13:07:34 +0300
commitab53591957d877908b89f6874e91c282bf59d165 (patch)
tree79e1b39043861970d268d2f9f903065968b2f2bc /js/Headlines.js
parent0c39a85a311354c0674b0538823a2c408a38a273 (diff)
somewhat experimental: disable article packing/unpacking, render content immediately
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-xjs/Headlines.js25
1 files changed, 2 insertions, 23 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index b98098c33..0194b9ae2 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -32,15 +32,6 @@ const Headlines = {
},
{threshold: [0, 1], root: document.querySelector("#headlines-frame")}
),
- unpack_observer: new IntersectionObserver(
- (entries, observer) => {
- entries.forEach((entry) => {
- if (entry.intersectionRatio > 0)
- Article.unpack(entry.target);
- });
- },
- {threshold: [0], root: document.querySelector("#headlines-frame")}
- ),
row_observer: new MutationObserver((mutations) => {
const modified = [];
@@ -369,7 +360,6 @@ const Headlines = {
if (hl.active) {
new_row.addClassName("active");
- Article.unpack(new_row);
if (App.isCombinedMode())
Article.cdmMoveToId(id, {noscroll: true});
@@ -385,11 +375,6 @@ const Headlines = {
this.sticky_header_observer.observe(e)
});
- if (App.getInitParam("cdm_expanded"))
- $$("#headlines-frame > div[id*=RROW].cdm").each((e) => {
- this.unpack_observer.observe(e)
- });
-
},
render: function (headlines, hl) {
let row = null;
@@ -426,7 +411,6 @@ const Headlines = {
id="RROW-${hl.id}"
data-article-id="${hl.id}"
data-orig-feed-id="${hl.feed_id}"
- data-content="${App.escapeHtml(hl.content)}"
data-score="${hl.score}"
data-article-title="${App.escapeHtml(hl.title)}"
onmouseover="Article.mouseIn(${hl.id})"
@@ -466,7 +450,7 @@ const Headlines = {
<div class="content" onclick="return Headlines.click(event, ${hl.id}, true);">
<div id="POSTNOTE-${hl.id}">${hl.note}</div>
<div class="content-inner" lang="${hl.lang ? hl.lang : 'en'}">
- <img src="${App.getInitParam('icon_indicator_white')}">
+ ${hl.content}
</div>
<div class="intermediate">
${hl.enclosures}
@@ -702,11 +686,6 @@ const Headlines = {
this.sticky_header_observer.observe(e)
});
- if (App.getInitParam("cdm_expanded"))
- $$("#headlines-frame > div[id*=RROW].cdm").each((e) => {
- this.unpack_observer.observe(e)
- });
-
} else {
console.error("Invalid object received: " + transport.responseText);
dijit.byId("headlines-frame").attr('content', "<div class='whiteBox'>" +
@@ -717,7 +696,7 @@ const Headlines = {
Feeds.infscroll_in_progress = 0;
// this is used to auto-catchup articles if needed after infscroll request has finished,
- // unpack visible articles, fill buffer more, etc
+ // fill buffer more, etc
this.scrollHandler();
Notify.close();