chat: New `hide` method to completely hide chat
parent
8ae5f25075
commit
1cbba4ea3a
|
@ -100,6 +100,14 @@ exports.chat = (() => {
|
|||
$('#chatbox').removeClass('visible');
|
||||
}
|
||||
},
|
||||
minimize() {
|
||||
if ($('#options-stickychat').prop('checked')) this.reduce();
|
||||
this.reduce();
|
||||
},
|
||||
hide() {
|
||||
this.minimize();
|
||||
$('#chaticon').hide();
|
||||
},
|
||||
scrollDown(force) {
|
||||
if ($('#chatbox').hasClass('visible')) {
|
||||
if (force || !this.lastMessage || !this.lastMessage.position() ||
|
||||
|
|
|
@ -76,8 +76,7 @@ const getParameters = [
|
|||
callback: (val) => {
|
||||
if (val === 'false') {
|
||||
settings.hideChat = true;
|
||||
chat.reduce();
|
||||
$('#chaticon').hide();
|
||||
chat.hide();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -480,10 +479,9 @@ const pad = {
|
|||
}
|
||||
|
||||
if (window.clientVars.readonly) {
|
||||
chat.reduce();
|
||||
chat.hide();
|
||||
$('#myusernameedit').attr('disabled', true);
|
||||
$('#chatinput').attr('disabled', true);
|
||||
$('#chaticon').hide();
|
||||
$('#options-chatandusers').parent().hide();
|
||||
$('#options-stickychat').parent().hide();
|
||||
} else if (!settings.hideChat) { $('#chaticon').show(); }
|
||||
|
|
Loading…
Reference in New Issue