Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
edmishchenko authored Jan 29, 2024
1 parent d9e3288 commit 9288840
Showing 1 changed file with 1 addition and 94 deletions.
95 changes: 1 addition & 94 deletions docs/getStarted.html
Original file line number Diff line number Diff line change
Expand Up @@ -518,100 +518,7 @@ <h2>Go Further</h2>
});
});

// document.addEventListener('DOMContentLoaded', function () {
const treeLinks = document.querySelectorAll('.tree-container a');
// let observer;
//
// function debounce(func, wait) {
// let timeout;
// return function () {
// const context = this, args = arguments;
// clearTimeout(timeout);
// timeout = setTimeout(function () {
// func.apply(context, args);
// }, wait);
// };
// }
//
// function handleIntersection(entries) {
// entries.forEach(function (entry) {
// const targetId = entry.target.id;
// if (entry.isIntersecting) {
// treeLinks.forEach(function (link) {
// link.classList.toggle('current', link.getAttribute('href') === '#' + targetId);
// });
// }
// });
// }
//
// function findClosestDiv() {
// let closestDiv = null;
// let closestDistance = Infinity;
//
// document.querySelectorAll('.tree-container a').forEach(function (link) {
// const targetId = link.getAttribute('href').substring(1);
// const targetElement = document.getElementById(targetId);
// if (targetElement) {
// const distance = Math.abs(targetElement.getBoundingClientRect().top);
// if (distance < closestDistance) {
// closestDiv = link;
// closestDistance = distance;
// }
// }
// });
//
// return closestDiv;
// }
//
// const firstLink = document.querySelector('.tree-container a');
// if (firstLink) {
// firstLink.classList.add('current');
// }
//
// treeLinks.forEach(function (link) {
// const targetId = link.getAttribute('href').substring(1);
// const targetElement = document.getElementById(targetId);
// if (targetElement) {
// observer = new IntersectionObserver(handleIntersection, { threshold: 1 });
// observer.observe(targetElement);
// }
//
// link.addEventListener('click', function () {
// if (getScreenWidth() <= 992) {
// hamburger.classList.toggle("is-active", false);
// thirdColumn.classList.toggle("show", false);
// thirdColumn.classList.toggle("hide");
// checkThirdColumn();
// }
// });
// });
//
// const handleScrollDebounced = debounce(function () {
// if (observer) {
// observer.disconnect();
//
// const closestLink = findClosestDiv();
//
// treeLinks.forEach(function (link) {
// link.classList.remove('current');
// });
//
// if (closestLink) {
// closestLink.classList.add('current');
// }
//
// treeLinks.forEach(function (link) {
// const targetId = link.getAttribute('href').substring(1);
// const targetElement = document.getElementById(targetId);
// if (targetElement) {
// observer.observe(targetElement);
// }
// });
// }
// }, 100);
//
// window.addEventListener('scroll', handleScrollDebounced);
// });
const treeLinks = document.querySelectorAll('.tree-container a');

function insertLineBreaks() {
const multilineElements = document.querySelectorAll('.main .second-column .code-container .multiline-text');
Expand Down

0 comments on commit 9288840

Please sign in to comment.