From 3777364459c026b06ee8ef5b553786474a503459 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 Nov 2020 11:01:22 +0000 Subject: [PATCH] Remove background link if image does not exist --- webinterface.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webinterface.py b/webinterface.py index fc08bb91b..0c6b6ce1d 100644 --- a/webinterface.py +++ b/webinterface.py @@ -8618,6 +8618,13 @@ def htmlSearch(cssCache: {}, translate: {}, profileStyle = getCSS(baseDir, cssFilename, cssCache) + if not os.path.isfile(baseDir + '/accounts/' + + 'follow-background.jpg'): + profileStyle = \ + profileStyle.replace('background-image: ' + \ + 'url("follow-background.jpg");', + 'background-image: none;') + followStr = htmlHeader(cssFilename, profileStyle) # show a banner above the search box