af_readability: fix selector

This commit is contained in:
Andrew Dolgov 2021-02-19 18:47:50 +03:00
parent 760a26e484
commit 5cec4eb015
1 changed files with 4 additions and 2 deletions

View File

@ -1,9 +1,11 @@
/* global xhr, App, Plugins, Article, Notify */
Plugins.Af_Readability = { Plugins.Af_Readability = {
orig_attr_name: 'data-readability-orig-content', orig_attr_name: 'data-readability-orig-content',
self: this, self: this,
embed: function(id) { embed: function(id) {
const content = App.find(App.isCombinedMode() ? ".cdm[data-article-id=" + id + "] .content-inner" : const content = App.find(App.isCombinedMode() ? `.cdm[data-article-id="${id}"] .content-inner` :
".post[data-article-id=" + id + "] .content"); `.post[data-article-id="${id}"] .content`);
if (content.hasAttribute(self.orig_attr_name)) { if (content.hasAttribute(self.orig_attr_name)) {
content.innerHTML = content.getAttribute(self.orig_attr_name); content.innerHTML = content.getAttribute(self.orig_attr_name);