PageSourceSearch

https://4brain.ru/js/video.js

js 4brain.ru collected 2026-09-24 08:54:28 UTC 1,316 bytes, 45 lines download raw bytes

1let showingYoutube = false;
2
3function initializeVideoBlocks() {
4  const allYoutube = document.querySelectorAll('.videoblock.youtube');
5  const allRutube = document.querySelectorAll('.videoblock.rutube');
6
7  if (showingYoutube) {
8    allYoutube.forEach(youtube => {
9      youtube.style.display = 'block';
10      youtube.style.animation = 'slideIn 0.5s ease-in-out forwards';
11    });
12    allRutube.forEach(rutube => {
13      rutube.style.display = 'none';
14      rutube.style.animation = 'slideOut 0.5s ease-in-out forwards';
15    });
16  } else {
17    allYoutube.forEach(youtube => {
18      youtube.style.display = 'none';
19      youtube.style.animation = 'slideOut 0.5s ease-in-out forwards';
20    });
21    allRutube.forEach(rutube => {
22      rutube.style.display = 'block';
23      rutube.style.animation = 'slideIn 0.5s ease-in-out forwards';
24    });
25  }
26}
27
28initializeVideoBlocks();
29
30document.addEventListener('click', function(event) {
31  if (event.target.classList.contains('toggle-button')) {
32    showingYoutube = !showingYoutube;
33    initializeVideoBlocks();
34  }
35});
36
37const observer = new MutationObserver(function(mutations) {
38  mutations.forEach(function(mutation) {
39    if (mutation.addedNodes.length) {
40      initializeVideoBlocks();
41    }
42  });
43});
44
45observer.observe(document.body, { childList: true, subtree: true });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.