- #rus #5min 5-минутное введение
- #rus #10min 10-минутное введение от Droider
- #rus #60min 33 запроса ChatGPT для начинающих
- #eng #34min ChatGPT Tutorial - A Crash Course on Chat GPT for Beginners
- #eng #47min «ChatGPT for Beginners: The Ultimate Use Cases for Everyone» от Udemy
- #eng #2h ChatGPT for Beginners
This file contains 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
class ActivityTracker { | |
constructor(totalTime, checkTime, metrikaId, debug = false) { | |
this.events = [ | |
"touchmove", | |
"blur", | |
"focus", | |
"focusin", | |
"focusout", | |
"load", | |
"resize", |
This file contains 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
/** | |
* | |
* redirect to homepage if has non "edit_posts" capabilities | |
*/ | |
add_filter("admin_init", function () { | |
if (!current_user_can('edit_posts')) { | |
wp_redirect(WP_HOME); | |
exit; |
This file contains 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
<link rel="preload" href="css/global.min.css" as="style" onload="this.rel='stylesheet'"> | |
<noscript><link rel="stylesheet" href="css/global.min.css"></noscript> | |
<script> | |
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ | |
!function(a){"use strict";var b=function(b,c,d){function j(a){if(e.body)return a();setTimeout(function(){j(a)})}function l(){f.addEventListener&&f.removeEventListener("load",l),f.media=d||"all"}var g,e=a.document,f=e.createElement("link");if(c)g=c;else{var h=(e.body||e.getElementsByTagName("head")[0]).childNodes;g=h[h.length-1]}var i=e.styleSheets;f.rel="stylesheet",f.href=b,f.media="only x",j(function(){g.parentNode.insertBefore(f,c?g:g.nextSibling)});var k=function(a){for(var b=f.href,c=i.length;c--;)if(i[c].href===b)return a();setTimeout(function(){k(a)})};return f.addEventListener&&f.addEventListener("load",l),f.onloadcssdefined=k,k(l),f};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this); | |
/*! loadCSS rel=preload po |
This file contains 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
<?php | |
add_filter( | |
'wp_schema_pro_schema_article', | |
/** | |
* Расширяет микроразметку BlogPosting для Яндекс.Метрики. | |
* | |
* @link https://metrika.yandex.ru/support/metrica/publishers/schema-org/json-ld.html#json-ld__identifier-desc | |
* | |
* @param array $schema Схема. | |
* @param array $data Данные. |
This file contains 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
/** Ожидание загрузки счетчика Яндекс.Метрики | |
* @param {?(number|string)} ymCounterNum - номер счетчика, если известен | |
* @param {function} callback - получает аргументами объект и номер счетчика | |
* @param {number} interval - интервал проверки готовности счетчика | |
*/ | |
function waitForYm(ymCounterNum, callback, interval) { | |
if (!callback) return; | |
if (!ymCounterNum) { | |
let metrikaObj = (window.Ya && (window.Ya.Metrika || window.Ya.Metrika2)) || null; | |
ymCounterNum = (metrikaObj && metrikaObj.counters && (metrikaObj.counters() || [0])[0].id) || 0; |
This file contains 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
function scrollTo(element) { | |
window.scroll({ | |
behavior: 'smooth', | |
left: 0, | |
top: element.getBoundingClientRect().top + document.documentElement.scrollTop - document.querySelector('header').offsetHeight + 20 | |
}) | |
} | |
https://github.com/RobinHerbots/Inputmask | |
$().inputmask('+7 (999) 999-99-99', {'clearIncomplete': true}); |
This file contains 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
Также необходимо внести правки в catalog/view/javascript/common.js | |
найти функцию cart.add | |
после if (json['success']) { | |
добавить sendYandexEcommerce(json, "add"); | |
найти функцию cart.remove после success: function(json) { | |
добавить sendYandexEcommerce(json, "remove"); |
This file contains 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
//Please ask Hatch to provide a list of all retailer IDs vs names | |
const retailer_mapping = { | |
94349 : 'MSI Store', | |
89105 : 'Walmart', | |
}; | |
//Listener on any hatch links | |
document.addEventListener( "click", hatchRetailerWidgetClick ); | |
function hatchRetailerWidgetClick(ev){ | |
const el = ev.target; |
This file contains 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
import VideoEvents from '@src/metrics/video_events'; | |
import logger from '@src/shared/logger'; | |
/** | |
* Custom Dimensions Map that is required for UA events with gtag | |
* This mapping is not required for GA4 | |
*/ | |
const concertCustomDimensionMap = { | |
'dimension1': 'video_id', | |
'dimension2': 'video_length', |
NewerOlder