mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 03:15:56 +00:00
migrate xhrJson invocations to the new helper
This commit is contained in:
@@ -16,7 +16,7 @@ Plugins.Af_Readability = {
|
||||
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhrJson("backend.php", App.getPhArgs("af_readability", "embed", {id: id}), (reply) => {
|
||||
xhr.json("backend.php", App.getPhArgs("af_readability", "embed", {id: id}), (reply) => {
|
||||
|
||||
if (content && reply.content) {
|
||||
content.setAttribute(self.orig_attr_name, content.innerHTML);
|
||||
|
||||
@@ -152,7 +152,7 @@ class Mail extends Plugin {
|
||||
<script type='dojo/method' event='onSubmit' args='evt'>
|
||||
evt.preventDefault();
|
||||
if (this.validate()) {
|
||||
xhrJson("backend.php", this.getValues(), (reply) => {
|
||||
xhr.json("backend.php", this.getValues(), (reply) => {
|
||||
if (reply && reply.error)
|
||||
Notify.error(reply.error);
|
||||
else
|
||||
|
||||
@@ -17,7 +17,7 @@ Plugins.Mail = {
|
||||
title: __("Forward article by email"),
|
||||
execute: function () {
|
||||
if (this.validate()) {
|
||||
xhrJson("backend.php", this.attr('value'), (reply) => {
|
||||
xhr.json("backend.php", this.attr('value'), (reply) => {
|
||||
if (reply) {
|
||||
const error = reply['error'];
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Plugins.Note = {
|
||||
if (this.validate()) {
|
||||
Notify.progress("Saving article note...", true);
|
||||
|
||||
xhrJson("backend.php", this.attr('value'), (reply) => {
|
||||
xhr.json("backend.php", this.attr('value'), (reply) => {
|
||||
Notify.close();
|
||||
dialog.hide();
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Plugins.Share = {
|
||||
|
||||
Notify.progress("Trying to change URL...", true);
|
||||
|
||||
xhrJson("backend.php", App.getPhArgs("share", "newkey", {id: id}), (reply) => {
|
||||
xhr.json("backend.php", App.getPhArgs("share", "newkey", {id: id}), (reply) => {
|
||||
if (reply) {
|
||||
const new_link = reply.link;
|
||||
const target = dialog.domNode.querySelector(".target-url");
|
||||
|
||||
Reference in New Issue
Block a user