From d01ad09800b67d2c83e2707188c8e5c58991db1e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Jun 2020 07:44:57 +0300 Subject: eslint-related fixes; move a few things from global context to App --- js/Headlines.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'js/Headlines.js') diff --git a/js/Headlines.js b/js/Headlines.js index 1e6fc4268..b98098c33 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -1,7 +1,7 @@ 'use strict'; -/* global __, ngettext, Article, App, escapeHtml */ -/* global xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, Feeds */ +/* global __, ngettext, Article, App */ +/* global xhrPost, dojo, dijit, PluginHost, Notify, $$, Feeds */ /* global CommonDialogs */ const Headlines = { @@ -402,7 +402,7 @@ const Headlines = { if (headlines.vfeed_group_enabled) row_class += " vgrlf"; if (headlines.vfeed_group_enabled && hl.feed_title && this.vgroup_last_feed != hl.feed_id) { - let vgrhdr = `
+ const vgrhdr = `
${hl.feed_icon}
${hl.feed_title} done_all @@ -426,9 +426,9 @@ const Headlines = { id="RROW-${hl.id}" data-article-id="${hl.id}" data-orig-feed-id="${hl.feed_id}" - data-content="${escapeHtml(hl.content)}" + data-content="${App.escapeHtml(hl.content)}" data-score="${hl.score}" - data-article-title="${escapeHtml(hl.title)}" + data-article-title="${App.escapeHtml(hl.title)}" onmouseover="Article.mouseIn(${hl.id})" onmouseout="Article.mouseOut(${hl.id})">
@@ -440,7 +440,7 @@ const Headlines = {
- + ${hl.title} ${hl.author} ${hl.labels} @@ -457,7 +457,7 @@ const Headlines = {
${Article.getScorePic(hl.score)} - + ${hl.feed_icon}
@@ -497,7 +497,7 @@ const Headlines = { data-orig-feed-id="${hl.feed_id}" data-article-id="${hl.id}" data-score="${hl.score}" - data-article-title="${escapeHtml(hl.title)}" + data-article-title="${App.escapeHtml(hl.title)}" onmouseover="Article.mouseIn(${hl.id})" onmouseout="Article.mouseOut(${hl.id})">
@@ -507,7 +507,7 @@ const Headlines = {
- ${hl.title} ${hl.content_preview} + ${hl.title} ${hl.content_preview} ${hl.author} ${hl.labels} @@ -520,7 +520,7 @@ const Headlines = {
${Article.getScorePic(hl.score)} - ${hl.feed_icon} + ${hl.feed_icon}
`; @@ -685,7 +685,7 @@ const Headlines = { console.log("no headlines received, infscroll_disabled=", Feeds.infscroll_disabled, 'first_id_changed=', first_id_changed); - let hsp = $("headlines-spacer"); + const hsp = $("headlines-spacer"); if (hsp) { if (first_id_changed) { @@ -1207,6 +1207,7 @@ const Headlines = { } }, onActionChanged: function (elem) { + // eslint-disable-next-line no-eval eval(elem.value); elem.attr('value', 'false'); }, -- cgit v1.2.3-54-g00ecf