Ejegg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/240902
Change subject: Don't remove overlay when redirecting
......................................................................
Don't remove overlay when redirecting
After the API call comes back, only remove the overlay if we're
going to let the user try again. If we remove it before redirecting
the user to the thank you or fail page, it looks like the click
did nothing for however long it takes to load the next page.
Change-Id: I0f561f5c2674d87eb9503eb7b9ca9b38364b4e0e
---
M amazon_gateway/amazon.js
1 file changed, 1 insertion(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/02/240902/1
diff --git a/amazon_gateway/amazon.js b/amazon_gateway/amazon.js
index 429bdb4..7a3d809 100644
--- a/amazon_gateway/amazon.js
+++ b/amazon_gateway/amazon.js
@@ -204,8 +204,8 @@
dataType: 'json',
type: 'POST',
success: function ( data ) {
- $( '#overlay' ).hide();
if ( data.errors ) {
+ $( '#overlay' ).hide();
handleErrors( data.errors );
} else if ( data.redirect ) {
location.href = data.redirect;
@@ -214,7 +214,6 @@
}
},
error: function () {
- $( '#overlay' ).hide();
location.href = failPage;
}
});
--
To view, visit https://gerrit.wikimedia.org/r/240902
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f561f5c2674d87eb9503eb7b9ca9b38364b4e0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits