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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-wishlist-1.0.js

Код файла
Версия от 04.12.2026, 04:03:54 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
1701			newPrice =1702				'<div class="t1002__product-amount-currency">' +1703				window.twishlist['currency_txt_l'] +1704				'</div>&nbsp;' +1705				newPrice;1706		}1707		if (window.twishlist['currency_txt_r']) {1708			newPrice +=1709				'&nbsp;<div class="t1002__product-amount-currency">' + window.twishlist['currency_txt_r'] + '</div>';1710		}1711	}1712	return newPrice;
История файла и сравнение версий
  • 04.12.2026, 04:03:54 · 56c3b845
1713}
1714
1715function twishlist__onFuncLoad(funcName, okFunc, time) {
1716 if (typeof window[funcName] === 'function') {
1717 okFunc();
1718 } else {
1719 var startTime = Date.now();
1720 setTimeout(function checkFuncExist() {
1721 var currentTime = Date.now();
1722 if (typeof window[funcName] === 'function') {
1723 okFunc();
1724 return;
1725 }
1726 if (
1727 document.readyState === 'complete' &&
1728 currentTime - startTime > 5000 &&
1729 typeof window[funcName] !== 'function'
1730 ) {
1731 throw new Error(funcName + ' is undefined');
1732 }
1733 setTimeout(checkFuncExist, time || 100);
1734 });
1735 }
1736}
1737
1738/**
1739 * Method isEmptyObject for ie8+
1740 *
1741 * @param {object} obj - object for checked
1742 * @returns {boolean} - return true/false
1743 */
1744function twishlist__isEmptyObject(obj) {
1745 for (var key in obj) {
1746 if (Object.prototype.hasOwnProperty.call(obj, key)) {
1747 return false;
1748 }
1749 }
1750 return true;
1751}
1752
1753function twishlist__getRootZone() {
1754 const allrecords = document.getElementById('allrecords');
1755 const rootZone = allrecords && allrecords.getAttribute('data-tilda-root-zone');
1756 return rootZone || 'com';
1757}
1758
1759if (!Element.prototype.matches) {
1760 Element.prototype.matches =
1761 Element.prototype.matchesSelector ||
1762 Element.prototype.msMatchesSelector ||
1763 Element.prototype.mozMatchesSelector ||
1764 Element.prototype.webkitMatchesSelector ||
1765 Element.prototype.oMatchesSelector;
1766}
1767
1768// Polyfill: Element.closest
1769if (!Element.prototype.closest) {
1770 Element.prototype.closest = function (s) {
1771 var el = this;
1772 while (el && el.nodeType === 1) {
1773 if (Element.prototype.matches.call(el, s)) {
1774 return el;
1775 }
1776 el = el.parentElement || el.parentNode;
1777 }
1778 return null;
1779 };
1780}
Предыдущие 100 строк