1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 12:25:56 +00:00

plugins: add some xhrPost refactoring

This commit is contained in:
Andrew Dolgov
2018-11-30 15:23:48 +03:00
parent 764434a491
commit 2f961ee830
5 changed files with 54 additions and 99 deletions

View File

@@ -2,13 +2,11 @@ function clearArticleAccessKeys() {
if (confirm(__("This will invalidate all previously shared article URLs. Continue?"))) {
notify_progress("Clearing URLs...");
var query = "?op=pluginhandler&plugin=share&method=clearArticleKeys";
const query = { op: "pluginhandler", plugin: "share", method: "clearArticleKeys" };
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
notify_info("Shared URLs cleared.");
} });
xhrPost("backend.php", query, () => {
notify_info("Shared URLs cleared.");
});
}
return false;