From a9b281ea1c2e3cd927547f1a36ea65d5c5d03d36 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 18 Oct 2019 18:07:45 +0100 Subject: [PATCH] Tidying --- webinterface.py | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/webinterface.py b/webinterface.py index 0050bbe80..11ff49d99 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1436,18 +1436,6 @@ def clickToDropDownScript() -> str: 'function dropdown() {\n' \ ' document.getElementById("myDropdown").classList.toggle("show");\n' \ '}\n' - #'window.onclick = function(event) {' \ - #" if (!event.target.matches('.dropbtn')) {" \ - #' var dropdowns = document.getElementsByClassName("dropdown-content");' \ - #' var i;' \ - #' for (i = 0; i < dropdowns.length; i++) {' \ - #' var openDropdown = dropdowns[i];' \ - #" if (openDropdown.classList.contains('show')) {" \ - #" openDropdown.classList.remove('show');" \ - #' }' \ - #' }' \ - #' }' \ - #'}' return script def cursorToEndOfMessageScript() -> str: @@ -1785,10 +1773,11 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \ displayName=getDisplayName(baseDir,postJsonObject['actor'],personCache) if displayName: - displayName= \ - addEmojiToDisplayName(baseDir,httpPrefix, \ - nickname,domain, \ - displayName,False) + if ':' in displayName: + displayName= \ + addEmojiToDisplayName(baseDir,httpPrefix, \ + nickname,domain, \ + displayName,False) titleStr+=''+displayName+'' else: titleStr+='@'+actorNickname+'@'+actorDomain+'' @@ -1964,10 +1953,11 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \ if avatarUrl2: avatarUrl=avatarUrl2 if displayName: - displayName= \ - addEmojiToDisplayName(baseDir,httpPrefix, \ - nickname,domain, \ - displayName,False) + if ':' in displayName: + displayName= \ + addEmojiToDisplayName(baseDir,httpPrefix, \ + nickname,domain, \ + displayName,False) titleStr=displayName+' '+titleStr avatarImageInPost= \