mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 18:25:55 +00:00
share plugin: fix unshare()
This commit is contained in:
@@ -47,17 +47,21 @@ Plugins.Share = {
|
|||||||
unshare: function () {
|
unshare: function () {
|
||||||
if (confirm(__("Remove sharing for this article?"))) {
|
if (confirm(__("Remove sharing for this article?"))) {
|
||||||
|
|
||||||
Notify.progress("Trying to unshare...", true);
|
|
||||||
|
|
||||||
const query = {op: "pluginhandler", plugin: "share", method: "unshare", id: id};
|
const query = {op: "pluginhandler", plugin: "share", method: "unshare", id: id};
|
||||||
|
|
||||||
xhrPost("backend.php", query, () => {
|
xhrPost("backend.php", query, () => {
|
||||||
notify("Article unshared.");
|
try {
|
||||||
|
const img = $("SHARE-IMG-" + id);
|
||||||
|
|
||||||
const img = $("SHARE-IMG-" + id);
|
if (img) {
|
||||||
img.removeClassName("shared");
|
img.removeClassName("shared");
|
||||||
|
img.up("div[id*=RROW]").removeClassName("shared");
|
||||||
|
}
|
||||||
|
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user