1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-24 11:56:36 +02:00
ttrss/plugins/note/note.js

18 lines
550 B
JavaScript
Raw Normal View History

Plugins.Af_Readability = {
embed: function(id) {
Notify.progress("Loading, please wait...");
2011-12-21 07:58:06 +01:00
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];
2011-12-21 07:58:06 +01:00
if (content && reply.content) {
content.innerHTML = reply.content;
Notify.close();
} else {
Notify.error("Unable to fetch content for this article");
}
2011-12-21 07:58:06 +01:00
});
}
};