From 8eff52ef13c369cc3340f17e272054fdbe6236dc Mon Sep 17 00:00:00 2001 From: lartsch Date: Tue, 22 Nov 2022 14:16:47 -0500 Subject: [PATCH] improve messages --- src/inject.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/inject.js b/src/inject.js index 16e56c3..511a9fe 100644 --- a/src/inject.js +++ b/src/inject.js @@ -194,7 +194,7 @@ async function processHomeInstance() { if (response.accounts.length && !response.statuses.length) { var redirect = location.protocol + "//" + location.hostname + "/@" + response.accounts[0].acct; $('div#fedifollow').append("

Success!

"); - $('div#fedifollow').append("

Attempting to follow...

"); + $('div#fedifollow').append("

Attempting auto-follow...

"); var requestUrl = location.protocol + "//" + location.hostname + "/api/v1/accounts/" + response.accounts[0].id + "/follow"; var responseFollow = await makeRequest("POST",requestUrl,headers); if (responseFollow) { @@ -202,7 +202,7 @@ async function processHomeInstance() { if (responseFollow.following || responseFollow.requested) { $('div#fedifollow').append("

Success!

"); } else { - $('div#fedifollow').append("

Auto-follow failed.

"); + $('div#fedifollow').append("

Failed.

"); } } } else if (!response.accounts.length && response.statuses.length) { @@ -215,7 +215,7 @@ async function processHomeInstance() { } var redirect = location.protocol + "//" + location.hostname + "/@" + statusData.account + "/" + statusData.id; if (fediParamActionValue == "boost" || fediParamActionValue == "favourite") { - $('div#fedifollow').append("

Attempting to " + fediParamActionValue + "...

"); + $('div#fedifollow').append("

Attempting auto-" + fediParamActionValue + "...

"); var actionRequest = location.protocol + "//" + location.hostname + "/api/v1/statuses/" + statusData.id + "/"; if (fediParamActionValue == "boost") { actionRequest = actionRequest + "reblog"; @@ -227,6 +227,8 @@ async function processHomeInstance() { actionResponse = JSON.parse(actionResponse); if (actionResponse.reblogged || actionResponse.favourited) { $('div#fedifollow').append("

Success!

"); + } else { + $('div#fedifollow').append("

Failed.

"); } } }