Код:
/*document.querySelector('.bb-popup').addEventListener('click', function(event) {
if (event.target.matches('#bb1')) {
bbtags("shoutbox-comment", "[b]", "[/b]");
} else if (event.target.matches('#bb2')) {
bbtags("shoutbox-comment", "[u]", "[/u]");
} else if (event.target.matches('#bb3')) {
bbtags("shoutbox-comment", "[i]", "[/i]");
} else if (event.target.matches('#bb4, #bb4 chx_i')) { // ВЫНЕСТИ В ДРУГОЕ МЕСТО
let height = document.querySelector(".shoutbox-form").offsetHeight;
document.querySelector(".chx-color-bb-prompt").style.height = height - 3 + 'px';
document.querySelectorAll(".chx-image-bb-prompt, .chx-link-bb-prompt").forEach(function(el) {
el.style.display = 'none';
});
document.querySelector(".chx-color-bb-prompt").style.display = 'block';
} else if (event.target.matches('#bb5, #bb6, #bb5 chx_i, #bb6 chx_i')) {
var heightFormBB = document.querySelector(".shoutbox-form").offsetHeight;
var chxImageBbPrompt = document.querySelector(".chx-image-bb-prompt");
var chxLinkBbPrompt = document.querySelector(".chx-link-bb-prompt");
if (chxImageBbPrompt) {
chxImageBbPrompt.style.height = heightFormBB - 3 + "px";
}
if (chxLinkBbPrompt) {
chxLinkBbPrompt.style.height = heightFormBB - 3 + "px";
}
}
});*/
/*const bb5 = document.querySelector("#bb5");
const bb6 = document.querySelector("#bb6");
const chxImageBbPrompt = document.querySelector(".chx-image-bb-prompt");
const chxLinkBbPrompt = document.querySelector(".chx-link-bb-prompt");
const chxColorBbPrompt = document.querySelector(".chx-color-bb-prompt");
bb5.onclick = function() {
chxColorBbPrompt.style.display = "none";
chxLinkBbPrompt.style.display = "none";
chxImageBbPrompt.style.display = "block";
}
bb6.onclick = function() {
chxImageBbPrompt.style.display = "none";
chxColorBbPrompt.style.display = "none";
chxLinkBbPrompt.style.display = "block";
}*/
/*
bb1.onclick = function() {
bbtags("shoutbox-comment", "[b]", "[/b]");
}
bb2.onclick = function() {
bbtags("shoutbox-comment", "[u]", "[/u]");
}
bb3.onclick = function() {
bbtags("shoutbox-comment", "[i]", "[/i]");
}
bb4.onclick = function() {
let height = jQuery(".shoutbox-form").height();
jQuery(".chx-color-bb-prompt").css({
height: height - 3
});
jQuery(".chx-image-bb-prompt, .chx-link-bb-prompt").fadeOut(0);
jQuery(".chx-color-bb-prompt").fadeIn(300);
bb4_1.onclick = function() {
bbtags("shoutbox-comment", "[color=red]", "[/color]");
}
bb4_2.onclick = function() {
bbtags("shoutbox-comment", "[color=orange]", "[/color]");
}
bb4_3.onclick = function() {
bbtags("shoutbox-comment", "[color=yellow]", "[/color]");
}
bb4_4.onclick = function() {
bbtags("shoutbox-comment", "[color=green]", "[/color]");
}
bb4_5.onclick = function() {
bbtags("shoutbox-comment", "[color=lightblue]", "[/color]");
}
bb4_6.onclick = function() {
bbtags("shoutbox-comment", "[color=blue]", "[/color]");
}
bb4_7.onclick = function() {
bbtags("shoutbox-comment", "[color=purple]", "[/color]");
}
jQuery(".chxicon-hue").click(function() {
jQuery(".chx-color-bb-prompt").fadeOut(300);
});
}*/
/*jQuery("#bb5, #bb6").click(function() {
let heightFormBB = jQuery(".shoutbox-form").height();
jQuery(".chx-image-bb-prompt, .chx-link-bb-prompt").css({
height: heightFormBB - 3
});
});*/
/*bb5.onclick = function() {
jQuery(".chx-color-bb-prompt, .chx-link-bb-prompt").fadeOut(0);
jQuery(".chx-image-bb-prompt").fadeIn(300);
}
bb6.onclick = function() {
jQuery(".chx-color-bb-prompt, .chx-image-bb-prompt").fadeOut(0);
jQuery(".chx-link-bb-prompt").fadeIn(300);
}*/
/*function loginForm() {
jQuery("#chatx").click(function(e) {
let target = jQuery(e.target);
if (target.hasClass("chx-close")) {
jQuery(".expanded .chx-login-form").fadeOut(300);
} else {
jQuery(".expanded .chx-login-form").fadeIn(300);
}
});
}
*/