1var clipboard = new ClipboardJS('.copy-click'); 2clipboard.on('success', function(e) { 3 let copyBtns = document.querySelectorAll('.copy-click'); 4 for (copyBtn of copyBtns) { 5 copyBtn.innerHTML = "ÐопÑÑваÑи"; 6 copyBtn.classList.remove("success"); 7 } 8 let classTriger = e.trigger; 9 classTriger.innerHTML = "СкопÑÑвали"; 10 classTriger.classList.add('success'); 11}); 12////BLOG SUBJECTS 13console.log('work'); 14let blogSubjects = document.querySelector(".single-subjects"); 15let blogH2 = document.querySelectorAll(".single .content h2"); 16let blogSubjectsBlock = document.querySelector(".single-subjects-inner"); 17let blogH2Array = []; 18 19if (blogH2.length > 0) { 20 blogSubjects.style.display = "inline-block"; 21} 22 23if (blogH2) { 24 for (const [index, bH2] of blogH2.entries()) { 25 bH2.id = "s" + index; 26 let tempH2 = bH2.innerText; 27 blogH2Array.push(tempH2); 28 } 29} 30 31for (const [index, bH2Ar] of blogH2Array.entries()) { 32 let tempH2Li = document.createElement("li"); 33 let tempH2A = document.createElement("a"); 34 tempH2Li.className = "mb-1"; 35 tempH2A.innerHTML = bH2Ar; 36 tempH2A.href = "#s" + index; 37 tempH2Li.append(tempH2A); 38 blogSubjectsBlock.append(tempH2Li); 39} 40 41let anchors = document.querySelectorAll('.single-subjects-inner a[href*="#"]'); 42 43for (anchor of anchors) { 44 if (anchor) { 45 anchor.addEventListener("click", function (e) { 46 e.preventDefault(); 47 anchorId = this.getAttribute("href"); 48 yOffset = -30; 49 element = document.querySelector(anchorId); 50 console.log(element); 51 y = element.getBoundingClientRect().top + window.pageYOffset + yOffset; 52 53 window.scrollTo({ top: y, behavior: "smooth" }); 54 }); 55 } 56}
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.