Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
xtekky
GitHub Repository: xtekky/tiktok-viewbot
Path: blob/main/zefoy/index.js
617 views
1
$(window).on("load", function() {
2
ajaxHRS();
3
});
4
5
function ajaxHRS() {
6
$("form").submit(function(event) {
7
event.preventDefault();
8
var hrefaction = $(this).attr("action");
9
10
var formData = new FormData(this);
11
$(".disableButton").prop("disabled", true);
12
var ajaxSettings = {
13
url: hrefaction,
14
type: "POST",
15
data: formData,
16
contentType: false,
17
cache: false,
18
processData: false,
19
timeout: 5e4
20
};
21
22
$.ajax(ajaxSettings).done(function(response) {
23
$("#" + hrefaction).html(atob(decodeURIComponent(response.split("").reverse().join(""))));
24
$("form").unbind();
25
ajaxHRS();
26
$(".disableButton").prop("disabled", false);
27
28
}).fail(function(error) {
29
$(".disableButton").prop("disabled", false);
30
$(".wbutton,.spinner-border,.list-group").hide();
31
$(".error").show();
32
});
33
});
34
};
35