integrated gitter sidecar chat

parent 9dc029ff
......@@ -782,3 +782,7 @@ th.active .arrow {
margin-bottom: -12px;
font-weight: bold;
}
.gitter-chat-embed {
z-index: 10000;
}
\ No newline at end of file
......@@ -75,6 +75,15 @@
<script type="text/javascript" src="{% static 'js/script.js' %}"></script>
{% endcompress %}{% endif %}
{% if config.GITTER_CHAT_ENABLE and config.GITTER_CHAT_CHANNEL %}
<script>
((window.gitter = {}).chat = {}).options = {
room: '{{ config.GITTER_CHAT_CHANNEL }}'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
{% endif %}
<link rel="manifest" href="/manifest.json">
</head>
......
......@@ -711,6 +711,8 @@ CONSTANCE_CONFIG = {
'IPV6_TEST_DOMAIN': ('faalkaart.nl', 'A server that is reachable over IPv6. This is used by a worker to determine '
'what kind of scans it can do. Enter an address that you own or manage.', str),
'GITTER_CHAT_ENABLE': (False, 'Show the Gitter Chat option on the website (using gitter sidecar).', bool),
'GITTER_CHAT_CHANNEL': ('internet-cleanup-foundation/support', 'Name of the channel chat takes place.', str),
#
# 'USE_CUSTOM_INTRO': (False, 'If you want to use an (untranslated) custom intro, enable this. Enabling this'
......@@ -751,6 +753,7 @@ CONSTANCE_CONFIG_FIELDSETS = OrderedDict([
'REPORT_INCLUDE_HTTP_HEADERS_HSTS',
'REPORT_INCLUDE_HTTP_HEADERS_XFO', 'REPORT_INCLUDE_HTTP_HEADERS_X_XSS',
'REPORT_INCLUDE_HTTP_HEADERS_X_CONTENT')),
('Chat (using gitter)', ('GITTER_CHAT_ENABLE', 'GITTER_CHAT_CHANNEL'))
])
# End constance settings
########
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment