Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-catalog-1.1.js

Код файла
Версия от 04.12.2026, 04:03:55 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
9101 * Remove the opacity value from the color string9102 *9103 * @param {string} color - the color to remove the opacity from.9104 * @returns {string} - the original color string with the opacity value removed.9105 **/9106function t_store_removeRgbOpacity(color) {9107	if (!color || !color.length) {9108		return null;9109	}9110 9111	var result = color.split(',');9112
История файла и сравнение версий
  • 04.12.2026, 04:03:55 · 56c3b845
9113 if (result[3]) {
9114 result[3] = '1)';
9115 }
9116
9117 return result.join();
9118}
9119
9120/**
9121 * Parsing the URL and extracting the query parameters
9122 *
9123 * @returns {object} JSON
9124 **/
9125function t_store_snippet_getJsonFromUrl() {
9126 var url = window.location.search;
9127 var query = url.substring(1);
9128 var result = {};
9129
9130 query.split('&').forEach(function (part) {
9131 var item = part.split('=');
9132 try {
9133 result[item[0]] = decodeURIComponent(item[1]); /* TODO: item[1].replace(/%(?![0-9][0-9a-fA-F]+)/g, '%25') */
9134 } catch (error) {
9135 console.error(error);
9136 result[item[0]] = item[1];
9137 }
9138 });
9139
9140 return result;
9141}
9142
9143/**
9144 * Clean the price value
9145 *
9146 * @param {number|string} priceToClean
9147 * @returns {number} clean price
9148 **/
9149function t_store__cleanPrice(priceToClean) {
9150 var price = priceToClean;
9151 if (price) {
9152 price = price.toString();
9153 price = price.replace(',', '.').replace(/[^0-9.]/g, '');
9154 price = parseFloat(price).toFixed(2);
9155 if (isNaN(price)) price = 0;
9156 price = parseFloat(price);
9157 price = price * 1;
9158 if (price < 0) price = 0;
9159 } else {
9160 price = 0;
9161 }
9162
9163 return price;
9164}
9165
9166/**
9167 * Remove the element from the DOM
9168 *
9169 * @param {HTMLElement} el - The element to remove
9170 **/
9171function t_store__removeElement(el) {
9172 if (el && el.parentNode) {
9173 el.parentNode.removeChild(el);
9174 }
9175}
9176
9177/**
9178 * Fade in an element
9179 *
9180 * @param {HTMLElement} el - the element to fade
9181 * @param {number} [duration] - the duration of the animation in milliseconds, default is 200ms
9182 * @returns {boolean|*} false
9183 **/
9184function t_store__fadeIn(el, animationDuration) {
9185 if (
9186 (getComputedStyle(el).opacity === '1' || getComputedStyle(el).opacity === '') &&
9187 getComputedStyle(el).display !== 'none'
9188 )
9189 return false;
9190 var opacity = 0;
9191 var duration = animationDuration;
9192 if (!duration) {
9193 duration = 200;
9194 }
9195 duration = parseInt(duration);
9196 var speed = duration > 0 ? duration / 10 : 40;
9197 el.style.opacity = opacity;
9198 el.style.display = 'block';
9199
9200 var timer = setInterval(function () {
Предыдущие 100 строкСледующие 100 строк