error reporting for shortening
This commit is contained in:
parent
2f1af5a59b
commit
bf3178d799
|
@ -1426,7 +1426,8 @@ function shortenUrlsInBox(shortenButton) {
|
|||
|
||||
display_spinner();
|
||||
|
||||
$.ajax({ url: window.urlShortenerAPIURL + '?format=jsonp&action=shorturl&signature=' + window.urlShortenerSignature + '&url=' + encodeURIComponent(url), type: "GET", dataType: "jsonp", success: function(data) {
|
||||
$.ajax({ url: window.urlShortenerAPIURL + '?format=jsonp&action=shorturl&signature=' + window.urlShortenerSignature + '&url=' + encodeURIComponent(url), type: "GET", dataType: "jsonp",
|
||||
success: function(data) {
|
||||
|
||||
if(typeof data.shorturl != 'undefined') {
|
||||
|
||||
|
@ -1436,7 +1437,12 @@ function shortenUrlsInBox(shortenButton) {
|
|||
shortenButton.addClass('disabled'); // make sure the button is disabled right after
|
||||
}
|
||||
remove_spinner();
|
||||
}});
|
||||
},
|
||||
error: function(data) {
|
||||
console.log(data);
|
||||
remove_spinner();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user