From 14348d6a5e42145298948a1b3b9e92e3dc413965 Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Sun, 12 Apr 2020 12:28:13 +0200 Subject: [PATCH] fix issue where switching chats didn't re-render math --- manifest.json | 2 +- riot-katex.js | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index 9745b70..fb853f2 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Riot KaTeX for matrix.tu-dresden.de", - "version": "1.0.6", + "version": "1.0.7", "description": "Renders formulas on matrix.tu-dresden.de chats using KaTeX.", diff --git a/riot-katex.js b/riot-katex.js index c689988..3007df1 100644 --- a/riot-katex.js +++ b/riot-katex.js @@ -84,7 +84,6 @@ return observer; } - let last_title = '' const header = document.querySelector('title'); // start listening @@ -92,10 +91,6 @@ // when changing the chat room, we have to create a new listener function change_chat_element(mutationsList, observer) { - if(last_title === header.textContent) - return; - - last_title = header.textContent; if (chat_observer) { chat_observer.disconnect(); }