From 5cec4eb0155735a2367701c5ae3a09f54e835a90 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 Feb 2021 18:47:50 +0300 Subject: [PATCH] af_readability: fix selector --- plugins/af_readability/init.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/af_readability/init.js b/plugins/af_readability/init.js index 5297416b3..0232ed32d 100644 --- a/plugins/af_readability/init.js +++ b/plugins/af_readability/init.js @@ -1,9 +1,11 @@ +/* global xhr, App, Plugins, Article, Notify */ + Plugins.Af_Readability = { orig_attr_name: 'data-readability-orig-content', self: this, embed: function(id) { - const content = App.find(App.isCombinedMode() ? ".cdm[data-article-id=" + id + "] .content-inner" : - ".post[data-article-id=" + id + "] .content"); + const content = App.find(App.isCombinedMode() ? `.cdm[data-article-id="${id}"] .content-inner` : + `.post[data-article-id="${id}"] .content`); if (content.hasAttribute(self.orig_attr_name)) { content.innerHTML = content.getAttribute(self.orig_attr_name);