From ef96c3b4711fa3dfb3539af86bcb89a34af3a458 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 Nov 2020 11:12:04 +0000 Subject: [PATCH] Clear person options background if file doesn't exist --- webinterface.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webinterface.py b/webinterface.py index 0c6b6ce1d..b4435852c 100644 --- a/webinterface.py +++ b/webinterface.py @@ -7936,6 +7936,13 @@ def htmlPersonOptions(cssCache: {}, translate: {}, baseDir: str, profileStyle.replace('--follow-text-entry-width: 90%;', '--follow-text-entry-width: 20%;') + if not os.path.isfile(baseDir + '/accounts/' + + 'options-background.jpg'): + profileStyle = \ + profileStyle.replace('background-image: ' + \ + 'url("options-background.jpg");', + 'background-image: none;') + # To snooze, or not to snooze? That is the question snoozeButtonStr = 'Snooze' if nickname: