diff options
author | Andrew Dolgov <[email protected]> | 2018-11-30 15:23:48 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-11-30 15:23:48 +0300 |
commit | 2f961ee830af21166d22bf3fae104291f614e7dd (patch) | |
tree | 1bc280bf9d8f480b70200fcf6dcc1d9406874bd2 /plugins/share/share_prefs.js | |
parent | 764434a491ee0b42b70d262fa49aee2b6a9e93a8 (diff) |
plugins: add some xhrPost refactoring
Diffstat (limited to 'plugins/share/share_prefs.js')
-rw-r--r-- | plugins/share/share_prefs.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/share/share_prefs.js b/plugins/share/share_prefs.js index e4c22262a..79ca37284 100644 --- a/plugins/share/share_prefs.js +++ b/plugins/share/share_prefs.js @@ -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; |