summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-19 15:09:53 +0300
committerAndrew Dolgov <[email protected]>2021-02-19 15:09:53 +0300
commitd9fe14a0123eb90008a1be4b6ab9bb21b42f3776 (patch)
treed88bdeaad474417a646fc2e3c38e423468f13a83 /js/Article.js
parent131f34648d8b8fa8388f619c144480e06f5f9921 (diff)
use template strings in a bunch of places instead of id concatenation
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/Article.js b/js/Article.js
index 4cd4d3237..4f3a162de 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -37,7 +37,7 @@ const Article = {
if (!isNaN(parseInt(score))) {
ids.forEach((id) => {
- const row = App.byId("RROW-" + id);
+ const row = App.byId(`RROW-${id}`);
if (row) {
row.setAttribute("data-score", score);
@@ -94,7 +94,7 @@ const Article = {
w.location = url;
},
cdmUnsetActive: function (event) {
- const row = App.byId("RROW-" + Article.getActive());
+ const row = App.byId(`RROW-${Article.getActive()}`);
if (row) {
row.removeClassName("active");
@@ -381,7 +381,7 @@ const Article = {
const force_to_top = params.force_to_top || false;
const ctr = App.byId("headlines-frame");
- const row = App.byId("RROW-" + id);
+ const row = App.byId(`RROW-${id}`);
if (!row || !ctr) return;
@@ -398,7 +398,7 @@ const Article = {
Article.pack(row);
});
- const row = App.byId("RROW-" + id);
+ const row = App.byId(`RROW-${id}`);
if (row) {
Article.unpack(row);