From 8abe489a1a014221f96a282a3a9b652ac14d8301 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Sun, 29 May 2022 20:42:56 +0400 Subject: [PATCH] SideBar plugin: remove unsafe/unused donation we can still keep largely undocumented feature of custom (for now BTC) addresses that site owners consciously put there --- plugins/Sidebar/SidebarPlugin.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index b3823046..72bff1eb 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -425,7 +425,6 @@ class UiWebsocketPlugin(object): """)) - donate_key = site.content_manager.contents.get("content.json", {}).get("donate", True) site_address = self.site.address body.append(_("""
  • @@ -433,9 +432,8 @@ class UiWebsocketPlugin(object):
    {site_address} """)) - if donate_key == False or donate_key == "": - pass - elif (type(donate_key) == str or type(donate_key) == str) and len(donate_key) > 0: + donate_key = site.content_manager.contents.get("content.json", {}).get("donate", None) + if type(donate_key) is str and len(donate_key) > 0: body.append(_("""
  • @@ -444,14 +442,6 @@ class UiWebsocketPlugin(object):
    {donate_key} """)) - else: - body.append(_(""" - {_[Donate]} - """)) - body.append(_(""" -
    - - """)) def sidebarRenderOwnedCheckbox(self, body, site): if self.site.settings["own"]: