Vastly reducing the threshold for chat autolock. Adding a cookie for storing the chat width, meaning that it won't need to be manually set to the same level on each refresh.

This commit is contained in:
Christian 'ketura' McCarty
2022-12-11 22:18:43 -06:00
parent 139c6dc7a8
commit b9a0effc7a
2 changed files with 11 additions and 1 deletions

View File

@@ -337,7 +337,7 @@ var ChatBoxUI = Class.extend({
var noScrollBars = maxScroll <= 0;
var ratio = scroll / maxScroll;
if(msgClass === "warningMessage" || noScrollBars || maxScroll <= 30 || ratio >= 0.95)
if(msgClass === "warningMessage" || noScrollBars || maxScroll <= 30 || ratio >= 0.999)
locked = true;
if(this.pingRegex != null && this.pingRegex.test(message))

View File

@@ -29,6 +29,16 @@ var GempLotrHallUI = Class.extend({
distance: 20
});
var storedChatSize = $.cookie("chatResize");
if (storedChatSize == null)
storedChatSize = 300;
$("#chat").height(storedChatSize);
$("#chat").resize(function() {
$.cookie("chatResize", $("#chat").height(), { expires:365 });
});
this.comm = new GempLotrCommunication(url, function (xhr, ajaxOptions, thrownError) {
if (thrownError != "abort") {
if (xhr != null) {