JSFiddle - React, Tailwind, and code Playground
by Taras Vasylivskyy
JavaScript
window.aciveAnim = true;
(function () {
window.API = window.API || {};
API.domainId = '0cf9cde3-3a57-431f-8dc4-a221004cf77e';
API.apiBaseUrl = 'http://api.demo.tributecenteronline.com' + '/ClientApi/';
API.tcoAppPath = '//';
if (API.tcoAppPath === "//")
API.tcoAppPath = '/';
API.isLocal = 'False' === 'True';
API.tcoBaseUrl = 'http://demo.tributecenteronline.com' + API.tcoAppPath;
API.tcoSecureBaseUrl = 'https://demo.secure.tributecenteronline.com' + API.tcoAppPath;
API.xWallUser = 'null';
API.s3Path = '//s3.amazonaws.com/demo.tributecenteronline/';
API.isLocal = 'false' === 'true';
if (API.xWallUser === "null")
API.xWallUser = null;
API.getCurrentUser = function () { return JSON.parse(API.xWallUser) };
API.ajax = function (httpMethod, controller, method, data, contentType, isApi, success, error) {
var baseUrl = isApi ? API.apiBaseUrl : API.tcoAppPath;
function filterError(data, textStatus, jqXHR) {
if (data && data.status === 403) {
var resp = JSON.parse(data.responseText);
if (controller.toLowerCase() === 'comments' && method.toLowerCase() === 'create')
authCallback.showRelationship = true;
if (resp.type && resp.type == 1) {
error("User is blocked");
} else if (Funeral.BeforePostData(authCallback)) {
return authCallback();
}
} else if ($.isFunction(error))
error(data.responseText);
};
function authCallback() {
$.ajax({
method: httpMethod,
contentType: contentType,
dataType: "json",
url: baseUrl + controller + '/' + method,
xhrFields: {
...