mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-27 07:27:03 +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);
|
||
|
});
|
||
|
});
|
||
|
})();
|