diff --git a/plugins/disabled-DonationMessage/DonationMessagePlugin.py b/plugins/disabled-DonationMessage/DonationMessagePlugin.py index 00be03f1..14f95b08 100644 --- a/plugins/disabled-DonationMessage/DonationMessagePlugin.py +++ b/plugins/disabled-DonationMessage/DonationMessagePlugin.py @@ -6,19 +6,17 @@ from Plugin import PluginManager @PluginManager.registerTo("UiRequest") class UiRequestPlugin(object): - # Inject a donation message to every page top right corner - def actionWrapper(self, path): - back = super(UiRequestPlugin, self).actionWrapper(path) - if not back or not hasattr(back, "endswith"): return back # Wrapper error or not string returned, injection not possible + # Inject a donation message to every page top right corner + def renderWrapper(self, *args, **kwargs): + body = super(UiRequestPlugin, self).renderWrapper(*args, **kwargs) # Get the wrapper frame output - back = re.sub("\s*\s*$", - """ - - Please donate to help to keep this ZeroProxy alive - - - """, back) + inject_html = """ + + Please donate to help to keep this ZeroProxy alive + + + """ - return back + return re.sub("\s*\s*$", inject_html, body)