Implement Patreon token syncer

This commit is contained in:
Jeremy Zhang
2017-11-22 02:41:43 +00:00
parent 2e71200843
commit 6d2d4dd19c
9 changed files with 262 additions and 9 deletions

View File

@ -0,0 +1,20 @@
/* global $, Materialize */
(function () {
function post() {
var funct = $.ajax({
dataType: "json",
method: "POST",
});
return funct.promise();
}
$("#syncbtn").click(function () {
var formPost = post();
formPost.done(function (data) {
window.location.href = "thanks";
});
formPost.fail(function (data) {
Materialize.toast('Failed to sync Patreon....', 10000);
});
});
})();