version 0.2.7, plugin system, multiuser plugin for zeroproxies, reworked imports, cookie parse, stats moved to plugin, usermanager class, dont generate site auth on listing, multiline notifications, allow server side prompt from user, update script keep plugins disabled status
2015-03-24 01:33:09 +01:00
|
|
|
import re
|
|
|
|
from Plugin import PluginManager
|
|
|
|
|
|
|
|
# Warning: If you modify the donation address then renmae the plugin's directory to "MyDonationMessage" to prevent the update script overwrite
|
|
|
|
|
|
|
|
|
|
|
|
@PluginManager.registerTo("UiRequest")
|
|
|
|
class UiRequestPlugin(object):
|
2016-03-16 23:25:27 +01:00
|
|
|
# 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
|
version 0.2.7, plugin system, multiuser plugin for zeroproxies, reworked imports, cookie parse, stats moved to plugin, usermanager class, dont generate site auth on listing, multiline notifications, allow server side prompt from user, update script keep plugins disabled status
2015-03-24 01:33:09 +01:00
|
|
|
|
2016-03-16 23:25:27 +01:00
|
|
|
inject_html = """
|
|
|
|
<style>
|
|
|
|
#donation_message { position: absolute; bottom: 0px; right: 20px; padding: 7px; font-family: Arial; font-size: 11px }
|
|
|
|
</style>
|
|
|
|
<a id='donation_message' href='https://blockchain.info/address/1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX' target='_blank'>Please donate to help to keep this ZeroProxy alive</a>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
"""
|
version 0.2.7, plugin system, multiuser plugin for zeroproxies, reworked imports, cookie parse, stats moved to plugin, usermanager class, dont generate site auth on listing, multiline notifications, allow server side prompt from user, update script keep plugins disabled status
2015-03-24 01:33:09 +01:00
|
|
|
|
2019-01-06 15:15:47 +01:00
|
|
|
return re.sub(r"</body>\s*</html>\s*$", inject_html, body)
|