WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit ff63cad

Browse files
committed
[#187] Support servers without the /register API.
1 parent 1fb8bcc commit ff63cad

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

www/js/app.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,20 @@ function registerWithServer() {
287287
onBuildSubmitSuccess();
288288
},
289289
error: function(xhr, type) {
290-
onBuildSubmitError();
290+
// support older servers that do not support /register
291+
$.ajax({
292+
type: 'GET',
293+
url: getAddress(),
294+
dataType: 'text',
295+
timeout: 1000 * 10,
296+
success: function(data) {
297+
onBuildSubmitSuccess();
298+
},
299+
error: function(xhr, type) {
300+
onBuildSubmitError();
301+
}
302+
});
303+
291304
}
292305
});
293306
}

0 commit comments

Comments
 (0)