From 8abe489a1a014221f96a282a3a9b652ac14d8301 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Sun, 29 May 2022 20:42:56 +0400 Subject: [PATCH 1/3] 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"]: From 33282c4d2f5f57265bcdff3f4e9a355804264be9 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Sun, 29 May 2022 20:53:15 +0400 Subject: [PATCH 2/3] SideBarPlugin: donate button back (still only BTC) --- plugins/Sidebar/SidebarPlugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index 72bff1eb..69ad60f3 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -440,7 +440,10 @@ class UiWebsocketPlugin(object):

  • - {donate_key} + {donate_key} + {_[Donate]} +
    +
  • """)) def sidebarRenderOwnedCheckbox(self, body, site): From bc313e3b6e688e6d7798065948c2d3b7d304231c Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Sun, 29 May 2022 20:58:10 +0400 Subject: [PATCH 3/3] fix SideBar --- plugins/Sidebar/SidebarPlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index 69ad60f3..987751e6 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -431,12 +431,12 @@ class UiWebsocketPlugin(object):
    {site_address} +
    + """)) 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(_(""" - -