Некодим© 2020-2026 Некодим
Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.
const allRecords = document.getElementById('allrecords');
1414 const excludedAttrNames = ['id', 'class', 'style', 'data-tilda-project-id', 'data-tilda-page-id'];1416 for (let i = 0; i < main.attributes.length; i++) {1417 const attr = main.attributes[i];1420 if (excludedAttrNames.includes(attr.name)) continue;1422 allRecords.setAttribute(attr.name, attr.value);1427 * Добавляет скрипты на страницу и запускает их1429 * @param {HTMLElement} main - элемент в котором необходимо искать скрипты1431 function tmst__addScripts(main) {1432 const scripts = main.querySelectorAll('script');1434 for (let i = 0; i < scripts.length; i++) {1435 const oldScript = scripts[i];1436 const newScript = document.createElement('script');1439 for (let j = 0; j < oldScript.attributes.length; j++) {1440 const attr = oldScript.attributes[j];1442 if (attr.name === 'src') {1448 if (src && oldScript.innerHTML.length === 0) {1451 newScript.innerHTML = oldScript.innerHTML;1452 oldScript.parentNode.appendChild(newScript);1454 setTimeout(function () {1462 * Создает стили для кастомизации индексной страницы1464 * @returns {string} - стили страницы1466 function tmst__applyStyles() {1467 const styles = window.tildaMembers.settingStyles;1468 const mainPage = styles.welcomepage;1470 tmst__initGlobalCssVariables();1472 if (!mainPage || !mainPage.typeId || mainPage.typeId !== 'custom') return;1476 if (mainPage.textMargin) {1477 const margin = Number(mainPage.textMargin.replace(/[^0-9]/g, ''));1479 textStyle += '.tlk-resources__item + .tlk-resources__item {\n';1480 textStyle += ` margin-top: ${mainPage.textMargin};\n`;1482 textStyle += '.tlk-resources__wrap > div + div {\n';1483 textStyle += ` margin-top: ${margin * 2}px;\n`;1485 textStyle += '.tlk-resources__groups-pages {\n';1486 textStyle += ` margin-top: ${margin * 0.4}px;\n`;1488 textStyle += '.tlk-resources__groups-pages-item + .tlk-resources__groups-pages-item {\n';1489 textStyle += ` margin-top: ${margin * 0.24}px;\n`;1493 if (mainPage.backgroundColor || mainPage.backgroundImage || mainPage.textSize) {1494 textStyle += '#app {\n';1496 if (mainPage.backgroundColor && !mainPage.backgroundImage) {1497 textStyle += ` background-color: rgba(${tmst__hexToRgb(mainPage.backgroundColor).join(', ')}, ${tma__getOpacity(mainPage.backgroundColorOpacity)});\n`;1500 if (mainPage.textSize) {