mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 04:35:56 +00:00
fix plugins/note javascript part broken by previous changeset
This commit is contained in:
17
plugins/af_readability/init.js
Normal file
17
plugins/af_readability/init.js
Normal file
@@ -0,0 +1,17 @@
|
||||
Plugins.Af_Readability = {
|
||||
embed: function(id) {
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhrJson("backend.php",{ op: "pluginhandler", plugin: "af_readability", method: "embed", param: id }, (reply) => {
|
||||
const content = $$(App.isCombinedMode() ? ".cdm[data-article-id=" + id + "] .content-inner" :
|
||||
".post[data-article-id=" + id + "] .content")[0];
|
||||
|
||||
if (content && reply.content) {
|
||||
content.innerHTML = reply.content;
|
||||
Notify.close();
|
||||
} else {
|
||||
Notify.error("Unable to fetch content for this article");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user