PageSourceSearch

https://betasia8.co/js/ajax_r.js

js betasia8.co collected 2026-10-10 00:01:01 UTC 1,895 bytes, 70 lines download raw bytes

1/* 
2 * done, fail, always = {
3 *  callback: functionName(),
4 *  message: success / fail message,
5 *  code: statusCode,
6 *  redirect: url
7 * }
8 */
9
10function ajaxRequest(type, url, data, done, fail, always, processData, contentType) {
11    var ajaxProperties = {
12        type: type,
13        url: url,
14        data: data
15    };
16
17    if (typeof processData !== "undefined") ajaxProperties.processData = processData;
18    if (typeof contentType !== "undefined") ajaxProperties.contentType = contentType;
19
20    $.ajax(ajaxProperties)
21        .done(function (res, status, xhr) {
22            callbackDone(done, res, status, xhr);
23        }).fail(function (xhr, status, err) {
24            callbackFail(fail, err, status, xhr);
25        }).always(function (res, status, xhr) {
26            callbackAlways(always, res, status, xhr);
27        });
28}
29
30function callbackDone(callback, res, status, xhr) {
31    try {
32        if (typeof callback !== "undefined" && callback != null) {
33            callback(res, status, xhr);
34        }
35    }
36    catch (err) {
37        console.log(err.message);
38        alert("Processing responsed data failed, please contact administrator.");
39    }
40}
41
42function callbackFail(callback, err, status, xhr) {
43    if (typeof callback !== "undefined" && callback != null) {
44        callback(err, status, xhr);
45    }
46
47    console.log("Status " + status + " - " + err);
48}
49
50function callbackAlways(callback, res, status, xhr) {
51    if (typeof callback !== "undefined" && callback != null) {
52        callback(res, status, xhr);
53    }
54}
55
56//function isEmptyObject(obj) {
57//    if (typeof obj === "undefined" || obj == null) {
58//        return true;
59//    }
60
61//    if (obj.constructor !== Object) {
62//        return true;
63//    }
64
65//    if (Object.keys(obj).length === 0) {
66//        return true;
67//    }
68
69//    return false;
70//}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.