PageSourceSearch

https://mos03.ru/bitrix/js/demius.bvi/script.js

js mos03.ru collected 2026-09-28 10:55:37 UTC 2,855 bytes, 82 lines download raw bytes

1new isvek.Bvi({
2    target: '.bvi-open',
3    fontSize: 14,
4    speech: true,
5});
6
7// let textToSpeak;
8// let utterance;
9
10let addSpeechButton = function() {
11    console.log('ready1');
12
13    let textToSpeak;
14    let utterance;
15
16    const speakDiv = document.querySelector('.speak');
17    console.log(speakDiv);
18
19    speakDiv.addEventListener('click', function(e) {
20        console.log('speakDiv clicked');
21        e.preventDefault();
22
23        if ('speechSynthesis' in window) {
24            console.log('speechSynthesis');
25            console.log(textToSpeak);
26            window.speechSynthesis.cancel();
27            window.speechSynthesis.speak(new SpeechSynthesisUtterance(textToSpeak));
28        }
29    });
30
31    const textBlocks = document.querySelectorAll('#text');
32    console.log('textBlocks', textBlocks);
33
34    const links = document.querySelectorAll('.bold-text, .blockquote-text, li, p, a, h1, h2, h3, h4');
35    // const links = document.querySelectorAll('p, a, h1, h2, h3, h4, .bold-text, li');
36    console.log('links', links);
37
38    for (link of links) {
39        // console.log(link);
40        console.log(link.textContent.trim());
41        link.title = "Переход по ссылке " + link.href;
42
43        if (link.textContent.trim()) {
44            // console.log(link);
45
46            link.addEventListener('mouseover', function(e) {
47                // console.log('Button mouseovered');
48                // console.log(e);
49                var rect = event.target.getBoundingClientRect();
50                // console.log('rect', r ect);
51                const style= getComputedStyle(event.target);
52                console.log('style paddingTop', style.paddingTop);
53                console.log('style paddingBottom', style.paddingBottom);
54                console.log('event.target.style.padding', event.target.style);
55
56                var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
57                // alert( "Текущая прокрутка: " + scrollTop );
58
59                const speakBlock = document.querySelector('.speak');
60                const topMargin = rect.top + rect.height + scrollTop;
61                const leftMargin = rect.left + ((rect.width - 50) / 2);
62
63                speakBlock.style.top = topMargin + 'px';
64                speakBlock.style.left = leftMargin + 'px';
65                speakBlock.style.display = 'block';
66                // console.log(speakBlock);
67                // console.log(e.target.textContent);
68                textToSpeak = e.target.textContent.trim();
69            });
70        }
71    }
72
73    const images = document.querySelectorAll('img');
74
75    for (img of images) {
76        if (!img.alt) {
77            img.alt = "Изображение";
78        }
79    }
80}
81
82// $(document).ready(addSpeechButton);

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.