mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Change location where socket is initialized...again
This commit is contained in:
parent
94d99862bd
commit
ba916b70bd
@ -201,7 +201,7 @@ nopaque.flash = function() {
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
// Disable all option elements with no value
|
||||
for (let optionElement of document.querySelectorAll('option[value=""]')) {
|
||||
optionElement.disabled = true;
|
||||
|
@ -44,17 +44,21 @@
|
||||
{% endif %}
|
||||
<script src="{{ url_for('static', filename='js/JSONPatch.js/jsonpatch.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/Dark_Reader/darkreader.js') }}"></script>
|
||||
{% if current_user.is_authenticated and current_user.setting_dark_mode %}
|
||||
<script>
|
||||
DarkReader.enable({"brightness": 150, "contrast": 100, "sepia": 0});
|
||||
</script>
|
||||
{% endif %}
|
||||
<script src="{{ url_for('static', filename='js/List.js/list.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/Socket.IO/socket.io.slim.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/nopaque.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/nopaque.lists.js') }}"></script>
|
||||
<script>
|
||||
{% if current_user.is_authenticated %}
|
||||
{% if current_user.setting_dark_mode %}
|
||||
DarkReader.enable({"brightness": 150, "contrast": 100, "sepia": 0});
|
||||
{% endif %}
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
nopaque.socket.init();
|
||||
nopaque.socket.emit("user_data_stream_init");
|
||||
});
|
||||
nopaque.flashedMessages = {{ get_flashed_messages(with_categories=True)|tojson }};
|
||||
{% endif %}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@ -235,13 +239,5 @@
|
||||
-->
|
||||
|
||||
<script src="{{ url_for('static', filename='js/Materialize/materialize.min.js') }}"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
{% if current_user.is_authenticated %}
|
||||
nopaque.socket.init();
|
||||
nopaque.socket.emit("user_data_stream_init");
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user