Created
December 5, 2016 10:10
-
-
Save Gegam/91626953fb11531f185ffc3f1ad2a032 to your computer and use it in GitHub Desktop.
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
| var ytVideo = document.getElementById('videoframe').contentWindow.document.querySelector('.html5-video-player'), | |
| videoFrame = [ | |
| documument.querySelector('[src]="https://www.youtube.com/embed/O_WinR_5UTs"'), | |
| documument.querySelector('[src]="https://www.youtube.com/embed/fATaXHdl8pk"'), | |
| documument.querySelector('[src]="https://www.youtube.com/embed/uzo0hHvMSFc"'), | |
| documument.querySelector('[src]="https://www.youtube.com/embed/LlwUzQyl9VQ"') | |
| ] | |
| for (var i = 0; i < videoFrame.length; i++) { | |
| videoFrame[i].addEventListener('click', function () { | |
| if (ytVideo.classList.contains('playing-mode')) | |
| ga('b.send', 'event', 'просмотр видео', 'видео ' + (i + 1)) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment