From bb4e4282f46824308aebc2eaeac29fa29f8687ad Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 Feb 2021 11:28:14 +0300 Subject: migrate a bunch of xhrPost invocations --- js/Article.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'js/Article.js') 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; -- cgit v1.2.3-54-g00ecf