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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-t136.js

Код файла
Версия от 18.08.2026, 07:00:16 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
101        var vid = $(v).videoBG(options);102            103        videoLoadProcessor.registerNewVideo(vid, {104            isNeedStop: false,105        });106    });107};108 109function SequenceController() {110    this.setScrollCb();111    this.itemHeight = screen.availHeight; /* document.documentElement.clientHeight || window.innerHeight || screen.availHeight;*/112    var itemTransitionItemRelation = 0.25;
История файла и сравнение версий
  • 18.08.2026, 07:00:16 · 56c3b845
113 this.itemTransitionTop = this.itemHeight * itemTransitionItemRelation;
114 this.activeItemIndex = null;
115 this.windowHeight = document.documentElement.clientHeight || window.innerHeight || screen.availHeight;
116 this.topOffsetShift = -150;
117 $(window).resize(jQuery.proxy(this.recalculateAllSequencesOffsets, this));
118 this._resizeInterval = setInterval(jQuery.proxy(this.scrollCb, this), 500);
119}
120
121SequenceController.prototype.defaultConfig = {
122 orientation: 'vertical',
123 speedFactor: 1,
124 automated: false,
125};
126
127SequenceController.prototype.sequenceObjects = [];
128/**
129 * @param {{}} sO
130 */
131
132SequenceController.prototype.recalculateAllSequencesOffsets = function () {
133 if (this._resizeTimeout) {
134 clearTimeout(this._resizeTimeout);
135 }
136
137 if (this._resizeInterval) {
138 clearInterval(this._resizeInterval);
139 }
140
141 this._resizeTimeout = setTimeout(
142 jQuery.proxy(function () {
143 this.scrollCb();
144 this._resizeInterval = setInterval(jQuery.proxy(this.scrollCb, this), 500);
145 }, this),
146 10
147 );
148};
149
150SequenceController.prototype.registerNewBlock = function (node) {
151 if (!(node instanceof HTMLElement)) {
152 throw new Error('Wrong node type in registerNewBlock');
153 }
154 for (var i = 0, l = this.sequenceObjects.length; i < l; i++) {
155 if (this.sequenceObjects[i].sequenceBlock === node) {
156 return false;
157 }
158 }
159 var sequenceHolder = node.querySelector('[data-hook="sequence-holder"]');
160 var sequenceHeight = 0;
161 var sequenceOffsetTop = this.getAbsoluteTopOffset(sequenceHolder);
162 var items = function () {
163 var _items = Array.prototype.slice.call(node.querySelectorAll('[data-hook="sequence-item"]'), 0),
164 __items = [];
165 _items.forEach(
166 jQuery.proxy(function (el, i, array) {
167 var elHeight = this.getItemHeight(el);
168 var backgroundHolder = el.querySelector('[data-hook="item-background"]');
169
170 el.style.height = elHeight + 'px';
171 backgroundHolder.style.height = this.itemHeight + 'px';
172 if (i < array.length - 1) {
173 sequenceHeight += elHeight;
174 }
175 __items.push({
176 node: el,
177 height: elHeight,
178 topOffset: this.getAbsoluteTopOffset(el.querySelector('.txt-holder')) - (i == array.length - 1 ? 0 : this.topOffsetShift),
179 backgroundHolder: backgroundHolder,
180 });
181 }, this)
182 );
183 return __items;
184 }.call(this);
185 var sequenceObject = {
186 sequenceBlock: node,
187 sequenceHolder: sequenceHolder,
188 sequenceHolderTopOffset: sequenceOffsetTop,
189 sequenceHeight: sequenceHeight,
190 items: items,
191 started: false,
192 prevBackgroundColor: '',
193 };
194
195 this.sequenceObjects.push(sequenceObject);
196
197 this.scrollCb();
198 return true;
199};
200
Предыдущие 100 строкСледующие 100 строк