summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-19 11:28:14 +0300
committerAndrew Dolgov <[email protected]>2021-02-19 11:28:14 +0300
commitbb4e4282f46824308aebc2eaeac29fa29f8687ad (patch)
tree8355547f2cf4baefc4a41146d27dcbd3240f724a /js/Article.js
parent6b43b788d909ce20f07f29f9f3ccd2f6a8715616 (diff)
migrate a bunch of xhrPost invocations
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/js/Article.js b/js/Article.js
index 379e05644..339d26266 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -1,7 +1,7 @@
'use strict'
/* eslint-disable no-new */
-/* global __, ngettext, App, Headlines, xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, fox */
+/* global __, ngettext, App, Headlines, xhr, dojo, dijit, PluginHost, Notify, fox */
const Article = {
_scroll_reset_timeout: false,
@@ -331,13 +331,11 @@ const Article = {
if (this.validate()) {
Notify.progress("Saving article tags...", true);
- xhrPost("backend.php", this.attr('value'), (transport) => {
+ xhr.json("backend.php", this.attr('value'), (data) => {
try {
Notify.close();
dialog.hide();
- const data = JSON.parse(transport.responseText);
-
if (data) {
const id = data.id;