ul = jQuery('chx_ul.shoutbox-content') function appendComments(data) { ul.empty(); data.forEach(function(d) { ul.prepend('<chx_li class="' + d.id + '">' + '<chx_p class="shoutbox-comment">' + '<chx_span class="shoutbox-username"><b data-loggedin="' + d.loggedIn + '" data-name="' + d.name + '">' + d.name + '</b></chx_span>' + '<chx_div class="shoutbox-comment-contents">' + (e_o === 1 ? emojione.toImage(d.text) : d.text) + '</chx_div>' + '<chx_div class="shoutbox-comment-details"><chx_span class="shoutbox-comment-ago">' + d.timeAgo + '<chx_span class="shoutbox-comment-time">' + d.timeStamp + '</chx_span></chx_span><chx_span class="shoutbox-comment-reply" data-name="' + d.name + '"><chx_i class="chxicon-reply"></chx_i></chx_span></chx_div>' + '</chx_p>' + '</chx_li>'); }); }
Авиация
Сообщений 61 страница 70 из 134
Поделиться612023-01-22 09:32 pm
Поделиться622023-01-22 09:37 pm
var ul = document.querySelector("chx_ul.shoutbox-content"); function appendComments(data) { ul.innerHTML = ""; data.forEach(function(d) { var li = document.createElement("chx_li"); li.className = d.id; var p = document.createElement("chx_p"); p.className = "shoutbox-comment"; var span = document.createElement("chx_span"); span.className = "shoutbox-username"; var b = document.createElement("b"); b.setAttribute("data-loggedin", d.loggedIn); b.setAttribute("data-name", d.name); b.textContent = d.name; span.appendChild(b); p.appendChild(span); var div1 = document.createElement("chx_div"); div1.className = "shoutbox-comment-contents"; div1.innerHTML = (e_o === 1 ? emojione.toImage(d.text) : d.text); p.appendChild(div1); var div2 = document.createElement("chx_div"); div2.className = "shoutbox-comment-details"; var span2 = document.createElement("chx_span"); span2.className = "shoutbox-comment-ago"; span2.textContent = d.timeAgo; div2.appendChild(span2); var span3 = document.createElement("chx_span"); span3.className = "shoutbox-comment-time"; span3.textContent = d.timeStamp; span2.appendChild(span3); var span4 = document.createElement("chx_span"); span4.className = "shoutbox-comment-reply"; span4.setAttribute("data-name", d.name); var i = document.createElement("chx_i"); i.className = "chxicon-reply"; span4.appendChild(i); div2.appendChild(span4); p.appendChild(div2); li.appendChild(p); ul.prepend(li); }); }
Поделиться632023-01-22 09:50 pm
jQuery('#icd').click(function() {
if (jQuery(this).prop('checked')) {
jQuery(".chx-pulsating-circle").show();
jQuery("#false_shoutbox_name").css({
"padding-right": "15px",
"transition": "0.3s ease"
});
} else {
jQuery(".chx-pulsating-circle").hide();
jQuery("#false_shoutbox_name").css({
"padding-right": "0",
"transition": "0.3s ease"
});
}
});
Поделиться642023-01-22 09:52 pm
document.querySelector("#icd").addEventListener("click", function() { if (this.checked) { document.querySelector(".chx-pulsating-circle").style.display = "block"; document.querySelector("#false_shoutbox_name").style.cssText = "padding-right: 15px; transition: 0.3s ease;"; } else { document.querySelector(".chx-pulsating-circle").style.display = "none"; document.querySelector("#false_shoutbox_name").style.cssText = "padding-right: 0; transition: 0.3s ease;"; } });
Поделиться652023-01-23 03:52 pm
var script = document.createElement("script"); script.src = chatx_server + 'data/languages/' + l_g + '/app_lang.' + l_g + '.php'; script.onload = function() { document.querySelector(".chx-bar chx_span").firstChild.textContent = chat; document.querySelector("#false_shoutbox_name").placeholder = nameInputValue; document.querySelector(".chx-management-link").textContent = management; document.querySelector(".name-required").textContent = noNameError; document.querySelector(".chx-fast-track").textContent = fastUpdate; document.querySelector(".chx-switch-tab.first").textContent = login; document.querySelector(".chx-switch-tab.second").textContent = signup; document.querySelector("input[name='u']").placeholder = userName; document.querySelector("input[name='p']").placeholder = passWord; document.querySelector("input[name='c_reg_p']").placeholder = confirmPassWord; document.querySelector(".chx-reg-disabled-caption").textContent = regDisabled; document.querySelector(".chx-history chx_div").textContent = recentlyInChat; document.querySelector("#shoutbox-comment").placeholder = newMessagePlaceholder; document.querySelector("input[name='url_to_img']").placeholder = imgUrlPlaceholder; document.querySelector("input[name='url_to_link']").placeholder = linkUrlPlaceholder; document.querySelector("input[name='link_desc']").placeholder = linkDesc; var style = document.createElement("style"); style.innerHTML = ".chatx_login span {font-size:0 !important}.chatx_login chx_span::after {content: '" + login + "'; font-size: 12px} .chatx_logout chx_span::after {content: '" + logout + "'; font-size: 12px} .chx-mybb-login::after {content: '" + mybbSignup + "';}"; document.querySelector("head").appendChild(style);
Поделиться662023-01-23 04:32 pm
let inputElements = document.querySelectorAll("input[name='u']");
inputElements.forEach(function(inputElement) {
inputElement.placeholder = userName;
});
Поделиться672023-01-23 04:42 pm
document.querySelector("input[name='u']").placeholder = userName;
document.querySelector("input[name='reg_u']").placeholder = userName;
Поделиться682023-01-23 04:43 pm
let inputElements = document.querySelectorAll("input[name='u'], input[name='reg_u']");
inputElements.forEach(function(inputElement) {
inputElement.placeholder = userName;
});
Поделиться692023-01-23 04:48 pm
document.querySelector(".chx-bar chx_span").textContent = chat;
document.querySelector("#false_shoutbox_name").placeholder = nameInputValue;
document.querySelector(".chx-management-link").textContent = management;
document.querySelector(".name-required").textContent = noNameError;
document.querySelector(".chx-fast-track").textContent = fastUpdate;
document.querySelector(".chx-switch-tab.first").textContent = login;
document.querySelector(".chx-switch-tab.second").textContent = signup;
let inputUsernames = document.querySelectorAll("input[name='u'], input[name='reg_u']");
inputUsernames.forEach(function(inputUsername) {
inputUsername.placeholder = userName;
});
let inputPasswords = document.querySelectorAll("input[name='p'], input[name='reg_p']");
inputPasswords.forEach(function(inputPassword) {
inputPassword.placeholder = userName;
});
document.querySelector("input[name='c_reg_p']").placeholder = confirmPassWord;
/*document.querySelector(".chx-reg-disabled-caption").textContent = regDisabled;*/
document.querySelector(".chx-history chx_div").textContent = recentlyInChat;
document.querySelector("#shoutbox-comment").placeholder = newMessagePlaceholder;
document.querySelector("input[name='url_to_img']").placeholder = imgUrlPlaceholder;
document.querySelector("input[name='url_to_link']").placeholder = linkUrlPlaceholder;
document.querySelector("input[name='link_desc']").placeholder = linkDesc;
var style = document.createElement("style");
style.innerHTML = ".chatx_login span {font-size:0 !important}.chatx_login chx_span::after {content: '" + login + "'; font-size: 12px} .chatx_logout chx_span::after {content: '" + logout + "'; font-size: 12px} .chx-mybb-login::after {content: '" + mybbSignup + "';}";
document.querySelector("head").appendChild(style);
Поделиться702023-01-23 08:33 pm
var draggable = chatx;
var chx_header_one = document.querySelector(".chx-bar");
var chx_header_two = document.querySelector(".chx-bar chx_span");
var x = 0;
var y = 0;
var pos1 = 0;
var pos2 = 0;
var pos3 = 0;
var pos4 = 0;
var isDragging = false;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);
}
}
});document.addEventListener("mouseup", function() {
if (isDragging) {
isDragging = false;
document.removeEventListener("mousemove", drag);
var chat_custom_position = {};
chat_custom_position[draggable.id] = {
top: draggable.offsetTop,
left: draggable.offsetLeft
};/*chat_custom_position[this.id] = ui.position;*/
localStorage.chat_custom_position = JSON.stringify(chat_custom_position);
}
});function drag(e) {
if (isDragging) {
e.preventDefault();
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
x = draggable.offsetLeft - pos1;
y = draggable.offsetTop - pos2;
x = Math.max(0, Math.min(x, window.innerWidth - draggable.offsetWidth - scrlbr_width));
y = Math.max(0, Math.min(y, window.innerHeight - draggable.offsetHeight - scrlbr_height));
draggable.style.left = x + "px";
draggable.style.top = y + "px";
}
}
Быстрый ответ
Похожие темы
Космос | Обои для рабочего стола | 2025-01-03 |