From 4b06b43b434c6613de2af66b0ddaa5042d5c390e Mon Sep 17 00:00:00 2001 From: fourtf Date: Wed, 30 May 2018 18:25:54 +0200 Subject: [PATCH] fixed collapsing chat when clicking the navbar --- browser_ext/inject.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser_ext/inject.js b/browser_ext/inject.js index 7d36ae7a4..033bdd472 100644 --- a/browser_ext/inject.js +++ b/browser_ext/inject.js @@ -41,7 +41,7 @@ if (x != undefined) { rightCollapseButton = x; - x.addEventListener("mouseup", () => { + x.addEventListener("click", () => { let y = findChatDiv(); if (parseInt(y.style.width) == 0) { @@ -78,6 +78,8 @@ let x = findNavBar(); x.addEventListener("mouseup", () => { + console.log(isCollapsed) + if (!isCollapsed) { let collapse = findRightCollapse(); collapse.click();