mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 10:22:43 +01:00
20 lines
506 B
JavaScript
20 lines
506 B
JavaScript
|
/* 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);
|
||
|
});
|
||
|
});
|
||
|
})();
|