sudo npm i -g n & sudo n 18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @version 15.04.2024 | |
| * @author https://t.me/artemsites | |
| * | |
| * async function() { | |
| * const res = await fetchGet('/order/coupon-check') | |
| * } | |
| */ | |
| export async function fetchGet(uri) { | |
| let res = await fetch(uri, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let infoTopFixed = false | |
| window.addEventListener("scroll",function(e) { | |
| if (infoTopFixed) { | |
| let bodyOffsetY = document.body.getBoundingClientRect().y | |
| let posY = (document.body.classList.contains('header-promo-visible')) ? 96 : 48 | |
| if (-1*bodyOffsetY <= posY) { | |
| infoTop.classList.remove('fixed') | |
| infoTopFixed = false | |
| } | |
| } else if (!infoTopFixed && infoTop.getBoundingClientRect().y <= 0) { |
https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
strictNullChecks: false, // - null и undefined фактически игнорируются языком. Это может привести к непредвиденным ошибкам во время выполнения.
strictNullChecks: true, // - null и undefined имеют свои собственные типы, и вы получите ошибку типа, если попытаетесь использовать их там, где ожидается конкретное значение.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Создать массив дней недели с отметкой о текущем дне и с пометкой минувших дней | |
| * @version 1.4 | 28.02.2024 | |
| * @source https://gist.github.com/artemsites/5fc9f97c01d5a8af1067c7fba8d2c08d | |
| */ | |
| /** | |
| * @param {Number} offsetWeek - 0 = теккущая неделя, 1 = следующая, -1 = предыдущая | |
| * @param {Array} availableDates - [{date: 2024-02-15},...] | |
| * @returns {Array} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @title Функции помощники для быстрого кодинга, лучшей читаемости и уменьшения итоговой сборки | |
| * | |
| * @version 1.3 | 20240521 | |
| * @author https://t.me/artemsites | |
| * | |
| * @param {string} selector - CSS selector | |
| * @param {Element} wrapper - Element wrapper, default document.documentElement | |
| * @returns {Element|NodeList} | |
| * |
npx playwright install
_
_
Как в Битрикс24 Bitrix24 сделать подстановку цветов карточек в зависимости от установленного тега | tag
Приведённый код нужно разместить в расширение для бразуера, прописав в расширении адрес crm bitrix24 в сети
"User JavaScript and CSS"
https://chromewebstore.google.com/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld