Шитпостинг

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Шитпостинг » Обои для рабочего стола » Авиация


Авиация

Сообщений 51 страница 60 из 134

51

Код:
<chx_li class="suxK"><chx_p class="shoutbox-comment"><chx_span class="shoutbox-username"><b data-loggedin="true" data-name="admin">admin</b></chx_span><chx_div class="shoutbox-comment-contents">вы</chx_div><chx_div class="shoutbox-comment-details"><chx_span class="shoutbox-comment-ago">5 h.<chx_span class="shoutbox-comment-time">21.01.2023 22:35</chx_span></chx_span><chx_span class="shoutbox-comment-reply" data-name="admin"><chx_i class="chxicon-reply"></chx_i></chx_span></chx_div></chx_p></chx_li>

52

Код:

document.querySelectorAll('.chxicon-reply').forEach(function(el) {
    el.addEventListener('click', function(e) {
        let replyName = e.target.closest('.shoutbox-comment-reply').dataset.name;
        console.log(replyName);
    });
});

53

Код:
draggable.addEventListener("mousedown", function(e) {
    if(!chatx.classList.contains('minimized')) {
        if (e.target === chx_header_one || e.target === chx_header_two) {
            isDragging = true;
            pos3 = e.clientX;
            pos4 = e.clientY;
            document.addEventListener("mousemove", drag);
        }
    }
});

54

Код:
draggable.addEventListener("mousedown", handleMouseDown);

function handleMouseDown(event) {
    if (!chatx.classList.contains("minimized") && (event.target === chx_header_one || event.target === chx_header_two)) {
        isDragging = true;
        pos3 = event.clientX;
        pos4 = event.clientY;
        document.addEventListener("mousemove", handleMouseMove);
    }
}

function handleMouseMove(event) {
    if (isDragging) {
        drag(event);
    }
}

55

Код:
let profile = document.querySelector("#profile");
let popUp = document.querySelector(".pop-up-container");

profile.addEventListener("mouseover", function() {
    setTimeout(() => {
        popUp.style.display = "block";
    }, 1000);
});

profile.addEventListener("mouseout", function() {
    popUp.style.display = "none";
});

document.addEventListener("click", function(event) {
    if (!event.target.closest("#profile") && !event.target.closest(".pop-up-container")) {
        popUp.style.display = "none";
    }
});

56

Код:
        function highlightMyMsg() {
            var userIcon = document.querySelector(".chx-bar .chxicon-user");
            var loggedInClass = "chxlogged-in";
            if (sessionName !== '') {
                jQuery(".shoutbox-username b[data-loggedin='true']:contains('" + sessionName + "')").closest("chx_li").attr("id", "chx-my-msg");
                userIcon.classList.add(loggedInClass);
            } else {
                userIcon.classList.remove(loggedInClass);
            }

            jQuery(".chatx_img").closest("chx_li").attr("data", "chx-img-msg");

        }

57

Код:
function highlightMyMsg() {
    var userIcon = document.querySelector(".chx-bar .chxicon-user");
    var loggedInClass = "chxlogged-in";

    if (sessionName !== '') {
        var elements = document.querySelectorAll(".shoutbox-username b[data-loggedin='true']:contains('" + sessionName + "')");
        for (var i = 0; i < elements.length; i++) {
            var closestLi = elements[i].closest("chx_li");
            if(closestLi) closestLi.setAttribute("id", "chx-my-msg");
        }
        userIcon.classList.add(loggedInClass);
    } else {
        userIcon.classList.remove(loggedInClass);
    }

    var imgElements = document.querySelectorAll(".chatx_img");
    for (var i = 0; i < imgElements.length; i++) {
        var closestLi = imgElements[i].closest("chx_li");
        if(closestLi) closestLi.setAttribute("data", "chx-img-msg");
    }
}


58

Код:
var elements = document.querySelectorAll(".shoutbox-username b[data-loggedin='true']");
for (var i = 0; i < elements.length; i++) {
    if(elements[i].textContent === sessionName){
        var closestLi = elements[i].closest("chx_li");
        if(closestLi) closestLi.setAttribute("id", "chx-my-msg");
    }
}

59

Код:
jQuery(".chatx_img").closest("chx_li").attr("data", "chx-img-msg");

60

var imgElements = document.querySelectorAll(".chatx_img");
for (var i = 0; i < imgElements.length; i++) {
    var closestLi = imgElements[i].closest("chx_li");
    if(closestLi) closestLi.setAttribute("data", "chx-img-msg");
}

Быстрый ответ

Напишите ваше сообщение и нажмите «Отправить»


Похожие темы


Вы здесь » Шитпостинг » Обои для рабочего стола » Авиация