Titan/webapp/titanembeds/static/js/patreon.js

20 lines
506 B
JavaScript
Raw Normal View History

2017-11-22 03:41:43 +01:00
/* 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);
});
});
})();