nt.querySelector(‘.own-comm-new-dop-ico’).style.display = ‘block’;
} else {
scrollContainer.previousElementSibling.querySelector(‘.own-comm-new-dop-ico’).style.display = ‘none’;
}
});
}
scrollComments(‘.comment-container’);scrollContainer.scrollTop = scrollContainer.scrollHeight;
}
function checkVariable() {
if (typeof bLazy !== ‘undefined’) {
bLazy.revalidate();
$(‘.own-comm-new-dop-ico’).on(‘mouseover’, function () {
bLazy.load($(‘.coment-emodzi’));
});
} else {
window.setTimeout(“checkVariable();”, 100);
}
}
function scrollComments(selector) {
const scrollContainer = document.querySelector(selector);
if (!scrollContainer) {
return;
}
scrollContainer.scrollTop = scrollContainer.scrollHeight;
}
function SetCurAftEl(el) {
let range = document.createRange();
range.setStartAfter(el);
range.setEndAfter(el);
SetRange(range);
}
function SetRange(range) {
if (document.getSelection) {
let sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
}
}scrollContainer.previousElementSibling.classList.remove(‘active’);
}
});
}
function checkVariable() {
if (typeof bLazy !== ‘undefined’) {
bLazy.revalidate();
$(‘.own-comm-new-dop-ico’).on(‘mouseover’, function () {
bLazy.load($(‘.coment-emodzi’));
});
} else {
window.setTimeout(“checkVariable();”, 100);
}
}
function scrollComments(selector) {
const scrollContainer = document.querySelector(selector);
if (!scrollContainer) {
return;
}
scrollContainer.addEventListener(‘scroll’, function () {
if (scrollContainer.scrollTop > 0) {
scrollContainer.previousElementSibling.classList.add(‘active’);
} else {
scrollContainer.previousElementSibling.classList.remove(‘active’);
}
});
}own-comm-new-mess’).on(‘click’, function () {
let el = document.getElementById(‘own-comm-new-mess-input’);
SetCurAftEl(el);
el.focus();
});
}
scrollComments(‘.comments-popup__body’);
function checkVariable() {
if (typeof bLazy !== ‘undefined’) {
if (bLazy.length) {
bLazy.revalidate();
}
$(‘.own-comm-new-dop-ico’).on(‘mouseover’, function () {
bLazy.load($(‘.coment-emodzi’));
});
} else {
window.setTimeout(“checkVariable();”, 100);
}
}
function scrollComments(selector) {
const scrollContainer = document.querySelector(selector);
if (!scrollContainer) {
return;
}
scrollContainer.addEventListener(‘scroll’, function () {
if (scrollContainer.scrollTop > 0) {
scrollContainer.previousElementSibling.classList.add(‘active’);
} else {
scrollContainer.previousElementSibling.classList.remove(‘active’);
}
});
}
checkVariable();This code appears to be a combination of JavaScript and jQuery. It includes functions for setting the current range after a specified element, setting a range, handling mouseover events, and scrolling comments.
The code also includes a reference to a specific date and time (2024-03-16 10:52:10) and a hashtag related to a sports event (Металлист, Рух, УПЛ).
It seems that the code is intended to handle user interactions and scrolling behavior on a web page, possibly related to a live sports event. The specific functionality and purpose of the code may depend on the context in which it is used.It looks like the code you’ve provided is a combination of JavaScript functions and some text related to a live sports event. The JavaScript functions seem to be related to handling user interactions on a web page, such as setting the current range after a specific element, loading content on mouseover, and handling scrolling behavior.
The text at the end appears to be a hashtag list related to a live sports event, possibly for use in social media or online promotion.
If you have a specific question or need assistance with any part of the code, please feel free to ask!It looks like the code provided is a combination of JavaScript and some date-related comment. The JavaScript code includes functions for setting the current range after a specific element, setting a range, and handling scroll events for a given selector.
The date-related comment at the end seems to be unrelated to the JavaScript code and may be a placeholder or a reminder for a specific date and hashtags.
If you have a specific question about the JavaScript code or need assistance with something related to it, please feel free to ask!This code appears to be a combination of JavaScript and jQuery. It includes functions for setting the current position after a specific element, setting a range, handling mouseover events, and scrolling comments.
The `SetCurAftEl` function takes an element as a parameter, creates a range, sets the start and end positions after the element, and then calls the `SetRange` function with the created range.
The `SetRange` function checks if `document.getSelection` is available, and if so, it sets the range for the current selection.
There is also a mouseover event listener for elements with the class `own-comm-new-dop-ico`, which triggers the lazy loading of elements with the class `coment-emodzi`.
The `scrollComments` function takes a selector as a parameter, finds the scroll container based on the selector, and adds a scroll event listener to it. When the scroll position is greater than 0, it adds the class ‘active’ to the previous sibling of the scroll container; otherwise, it removes the class ‘active’.
The `checkVariable` function is called at the end of the code, but the implementation of this function is not provided in the given code snippet.
Overall, this code snippet seems to be a part of a larger codebase that includes functionality for handling user interactions, lazy loading, and scrolling behavior.It looks like the code provided is a combination of JavaScript and some HTML/CSS selectors. The JavaScript functions seem to be related to manipulating the DOM and handling user interactions on a web page.
The `SetCurAftEl` function sets the current range after a specified element, and the `SetRange` function sets the range for the current selection.
The code also includes an event listener for the `mouseover` event on elements with the class `own-comm-new-dop-ico`, which triggers the lazy loading of elements with the class `coment-emodzi`.
Additionally, there is a function `scrollComments` that adds a class to an element based on the scroll position of a specified container.
The code also includes a call to the `checkVariable` function, which seems to be a recursive function that checks for a variable and sets a timeout to call itself again if the variable is not found.
Finally, there is a comment at the end of the code mentioning a date and some hashtags related to a live video broadcast of a sports match.
Overall, the code appears to be related to handling user interactions, lazy loading of elements, and scrolling behavior on a web page, as well as a reference to a live sports broadcast.It looks like the code provided is a combination of JavaScript and some text related to a live sports event. The JavaScript code includes functions for setting the current range after a specific element, handling scroll events, and checking a variable. The text at the end seems to be unrelated to the JavaScript code and may be a placeholder or a comment.
If you have a specific question or need assistance with the JavaScript code, please provide more context or details about what you’re trying to achieve.ation for the code provided, it seems to be a combination of JavaScript and jQuery functions for handling user interactions on a web page.
The `SetCurAftEl` function is used to set the current range after a specified element, and it calls the `SetRange` function to apply the range to the document’s selection.
The `SetRange` function uses the `window.getSelection` method to get the current selection and then adds the specified range to it.
The code also includes an event listener for the `mouseover` event on elements with the class `own-comm-new-dop-ico`, which triggers the lazy loading of elements with the class `coment-emodzi`.
Additionally, there is a function `scrollComments` that adds a scroll event listener to a specified scroll container, toggling the `active` class on its previous sibling based on the scroll position.
The `checkVariable` function is called initially and then recursively with a timeout, but the purpose of this function is not clear from the provided code snippet.
Finally, there is a comment at the end of the code mentioning a date and a set of hashtags, which seems unrelated to the code itself and may be a placeholder or a note for future reference.
Overall, the code appears to be a mix of functionality related to text selection, lazy loading of elements, and handling scroll events on a web page.It looks like the code provided is a combination of JavaScript functions and some text related to a live sports event. The JavaScript functions appear to be related to setting the current range after a specific element, handling scroll events, and loading images lazily. The text at the end seems to be a hashtag related to a sports match.
If you have a specific question about the code or need assistance with something specific, please feel free to ask!It looks like the code provided is a combination of JavaScript and some date-related comment. The JavaScript code includes functions for setting the current position after a specified element, setting a range, and handling scroll events for a specified selector.
The date-related comment at the end appears to be unrelated to the JavaScript code and may be a placeholder or a reminder for a specific date and time.
If you have a specific question or need assistance with the JavaScript code, please provide more context or details about what you’re trying to achieve, and I’d be happy to help further.This code appears to be a combination of JavaScript and jQuery. It includes functions for setting the current position after a specified element, setting a range, and handling scroll events for a specified selector.
The `SetCurAftEl` function takes an element as a parameter, creates a range, sets the start and end points of the range after the specified element, and then calls the `SetRange` function with the created range.
The `SetRange` function checks if `document.getSelection` is available, and if so, it sets the selection to the specified range.
There is also an event listener for the `mouseover` event on elements with the class `own-comm-new-dop-ico`, which triggers the lazy loading of elements with the class `coment-emodzi`.
Additionally, there is a `scrollComments` function that takes a selector as a parameter and adds a scroll event listener to the specified scroll container. When the container is scrolled, it adds or removes the class `active` from the previous sibling element based on the scroll position.
The `checkVariable` function is called initially and then recursively with a timeout of 100ms until a certain condition is met.
Overall, this code appears to be related to handling user interactions, lazy loading, and scroll events on a web page.It seems like the code provided is a combination of JavaScript and jQuery functions. The functions appear to be related to handling user interactions on a web page, such as setting the current range after a specific element, setting a range for document selection, lazy loading of images on mouseover, and scrolling behavior for a specific container.
The code also includes a reference to a date and a hashtag related to a sports event, which seems to be unrelated to the JavaScript and jQuery functions.
If you have specific questions about the code or need further explanation on how these functions work, please feel free to ask.It looks like the code provided is a combination of JavaScript and some kind of date or timestamp. The JavaScript code includes functions for setting the current range after a specific element, setting a range, handling mouseover events, and scrolling comments.
The date or timestamp at the end of the code is “2024-03-16 10:52:10” and is followed by some hashtags related to “Металлист” (Metalist), “Рух” (Rukh), and watching something online in live streaming.
It seems like the code snippet is incomplete and may be part of a larger web development project or script. If you need further assistance, please provide more context or specific details about what you’re trying to achieve with this code.// Perform some action when the scroll container is scrolled
}
});
}
// Call the scrollComments function with the selector for the scroll container
scrollComments(‘.scroll-container’);