|
Ok!
|
|
|
Ok!
|
---|---|---|---|---|
171 | http://example.com/?_ym_debug=1 | метрика, counter test, проверка | 12300 | Проверка счетчиков и событий метрики в консоли |
170 | /bitrix/admin/perfmon_table.php?PAGEN_1=1&SIZEN_1=20&lang=ru&table_name=b_event&by=DATE_INSERT&order=desc | битрикс, отправленные письма | 11020 | Список отправленных писем в Битрикс |
169 | /* javascript url кодирует сорсы всех картинок */ var arr = document.querySelectorAll('img') arr.forEach(function(item, i, arr) { var uri = arr[i].src; var encoded = encodeURI(uri); arr[i].src = encoded; }); | urlencode, имена картинок | 10090 | url кодировать все файлы картинок javascript |
168 | add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); function custom_override_checkout_fields( $fields ) { //unset($fields['billing']['billing_first_name']);// имя unset($fields['billing']['billing_last_name']);// фамилия unset($fields['billing']['billing_company']); // компания unset($fields['billing']['billing_address_1']);// unset($fields['billing']['billing_address_2']);// unset($fields['billing']['billing_city']); unset($fields['billing']['billing_postcode']); unset($fields['billing']['billing_country']); unset($fields['billing']['billing_state']); //unset($fields['billing']['billing_phone']); //unset($fields['order']['order_comments']); //unset($fields['billing']['billing_email']); //unset($fields['account']['account_username']); //unset($fields['account']['account_password']); //unset($fields['account']['account_password-2']); unset($fields['billing']['billing_company']);// компания unset($fields['billing']['billing_postcode']);// индекс return $fields; } | woocommerce, лишние поля | 3400 | Удалить лишние поля для оформления заказа на woocommerce |
167 | document.addEventListener("DOMContentLoaded", function (event) { setTimeout(function() { document.querySelectorAll('*').forEach.call( document.querySelectorAll('img[data-src]'), function (img) { img.setAttribute('src', img.getAttribute('data-src')); img.onload = function () { img.removeAttribute('data-src'); }; }); },200); }); | отложенная, загрузка | 120 | Отложенная загрузка изображений |
166 | <script> document.addEventListener("touchstart", function(e) { console.log(e.defaultPrevented); // will be false e.preventDefault(); // does nothing since the listener is passive console.log(e.defaultPrevented); // still false }, Modernizr.passiveeventlisteners ? {passive: true} : false); </script> | touchstart,passive,js | 100 | Пассивный ивент листнер |
165 | <link rel="canonical" href="<?= substr(strtolower($_SERVER['REQUEST_URI']), 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1) ?>"/> | каноникал, canoncal | 90 | Сделать rel каноникал в php |
164 | for messages_count in range(0, 100): remainder = messages_count % 10 if messages_count == 0: print('У вас нет новых сообщений') elif messages_count == 1 or (remainder == 1 and messages_count > 11): print('У вас ' + str(messages_count) + ' новое сообщение') elif (messages_count >= 2 and messages_count <= 4) or (remainder > 1 and remainder < 5 and messages_count > 20): print('У вас ' + str(messages_count) + ' новых сообщения') else: print('У вас ' + str(messages_count) + ' новых сообщений') | склонения чисел | 120 | Если 2, 3 или 4 – то сообщения, иначе сообщений |
163 | function string_clip($string, $length) { $string = preg_replace( "/ | /", "", strip_tags($string)); $string = explode(" ", $string); $string = array_slice($string, 0, $length); return implode(" ", $string); } | crop string | 1390 | Обрезать текст по числу слов |
162 | li:not(:last-child):not(:first-child) | ни первый ни послеадний, css | 100200 | ни первый ни послеадний из скписка |