Каталог файловtilda-cart-1.1.js
6201 console.error(error);6202 }6203}6204 6205// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)6206// @ts-expect-error ST-2949_26207function tcart__onFuncLoad(funcName, okFunc, time) {6208 if (typeof window[funcName] === 'function') {6209 okFunc();6210 } else {6211 var startTime = Date.now();6212
История файла и сравнение версий
var error = new Error(funcName + ' is undefined');
6213 var callbackError = function () { 6216 setTimeout(function checkFuncExist() { 6217 var currentTime = Date.now(); 6218 if (typeof window[funcName] === 'function') { 6223 document.readyState === 'complete' && 6224 currentTime - startTime > 5000 && 6225 typeof window[funcName] !== 'function' 6229 setTimeout(checkFuncExist, time || 100); 6234// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 6235// @ts-expect-error ST-2949_2 6236function tcart_fadeOut(el, duration, complete) { 6238 var animationDuration = parseInt(duration); 6239 var speed = animationDuration > 0 ? animationDuration / 10 : 40; // default duration = 400 6240 var timer = setInterval(function () { 6241 el.style.opacity = opacity; 6243 if (opacity <= 0.1) { 6244 clearInterval(timer); 6245 el.style.display = 'none'; 6246 if (typeof complete === 'function') { 6253// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 6254// @ts-expect-error ST-2949_2 6255function tcart_fadeIn(el, duration, complete) { 6257 (getComputedStyle(el).opacity === '1' || getComputedStyle(el).opacity === '') && 6258 getComputedStyle(el).display !== 'none' 6262 var animationDuration = parseInt(duration); 6263 var speed = animationDuration > 0 ? animationDuration / 10 : 40; 6264 el.style.opacity = opacity; 6265 el.style.display = ''; 6266 var timer = setInterval(function () { 6267 el.style.opacity = opacity; 6269 if (opacity >= 1.0) { 6270 clearInterval(timer); 6271 if (typeof complete === 'function') { 6280 * Method isEmptyObject for ie8+ 6282 * @param {object} obj - object for checked 6283 * @returns {boolean} - return true/false 6285function tcart__isEmptyObject(obj) { 6286 for (var key in obj) { 6287 if (Object.prototype.hasOwnProperty.call(obj, key)) { 6295 * Polyfill: Element.matches 6297if (!Element.prototype.matches) { 6298 Element.prototype.matches = 6299 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 6300 // @ts-expect-error ST-2949_1