while (tmp.hasChildNodes()) {
var row = tmp.removeChild(tmp.firstChild);
- if (loaded_article_ids.indexOf(row.id) == -1 || row.hasClassName("cdmFeedTitle")) {
+ if (loaded_article_ids.indexOf(row.id) == -1 || row.hasClassName("feed-title")) {
dijit.byId("headlines-frame").domNode.appendChild(row);
loaded_article_ids.push(row.id);
while (tmp.hasChildNodes()) {
let row = tmp.removeChild(tmp.firstChild);
- if (loaded_article_ids.indexOf(row.id) == -1 || row.hasClassName("cdmFeedTitle")) {
+ if (loaded_article_ids.indexOf(row.id) == -1 || row.hasClassName("feed-title")) {
dijit.byId("headlines-frame").domNode.appendChild(row);
loaded_article_ids.push(row.id);
// expanded cdm has a 4px margin now
ctr.scrollTop = parseInt(e.offsetTop) - 4;
+
+ // article is selected manually, set it read
+ toggleUnread(id, 0);1
}
}
const content = row.getAttribute("data-content");
- row.select(".cdmContentInner")[0].innerHTML = content;
+ row.select(".content-inner")[0].innerHTML = content;
row.removeAttribute("data-content");
PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED_CDM, row);
const row = $("RROW-" + id);
if (row) {
- const pic = row.getElementsByClassName("hlScorePic")[0];
+ const pic = row.getElementsByClassName("score-pic")[0];
if (pic) {
pic.src = pic.src.replace(/score_.*?\.png/,
}
}
-/*
-function updateScore(id) {
- const pic = $$("#RROW-" + id + " .hlScorePic")[0];
-
- if (pic) {
-
- const query = "op=article&method=getScore&id=" + param_escape(id);
-
- new Ajax.Request("backend.php", {
- parameters: query,
- onComplete: function (transport) {
- console.log(transport.responseText);
-
- const reply = JSON.parse(transport.responseText);
-
- if (reply) {
- pic.src = pic.src.replace(/score_.*?\.png/, reply["score_pic"]);
- pic.setAttribute("score", reply["score"]);
- pic.setAttribute("title", reply["score"]);
- }
- }
- });
- }
-} */
-
function changeScore(id, pic) {
const score = pic.getAttribute("score");
if (child && child.offsetTop + child.offsetHeight > hf.scrollTop) {
- const header = child.getElementsByClassName("cdmHeader")[0];
+ const header = child.getElementsByClassName("header")[0];
if (unread_only || child.getAttribute("data-article-id") != $("floatingTitle").getAttribute("data-article-id")) {
if (child.getAttribute("data-article-id") != $("floatingTitle").getAttribute("data-article-id")) {