From 501eb3756cb1ab0f6260cb78e439fdec85f3c708 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Fri, 17 Jan 2020 10:49:04 +0100 Subject: [PATCH] Minor updates --- app/static/js/nopaque.js | 12 ++---------- app/templates/admin/user.html.j2 | 3 +-- app/templates/base.html.j2 | 18 ++++++++++-------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/app/static/js/nopaque.js b/app/static/js/nopaque.js index f06950ed..23952221 100644 --- a/app/static/js/nopaque.js +++ b/app/static/js/nopaque.js @@ -1,5 +1,3 @@ -var darkModeEnabled = false; -var flashedMessages = []; var socket = io(); var corpora; @@ -90,7 +88,7 @@ socket.on('update-foreign-jobs', function(msg) { }); -document.addEventListener('DOMContentLoaded', function() { +document.addEventListener("DOMContentLoaded", function() { M.AutoInit(); M.CharacterCounter.init(document.querySelectorAll(`input[data-length][type="text"]`)); M.Dropdown.init(document.getElementById("nav-notifications"), @@ -102,11 +100,5 @@ document.addEventListener('DOMContentLoaded', function() { entry.parentNode.classList.add("active"); } } - if (darkModeEnabled) { - DarkReader.enable({"brightness": 100, "contrast": 100, "sepia": 0}); - } - for (flashedMessage of flashedMessages) { - toast(flashedMessage); - } - socket.emit('subscribe_user_ressources'); + socket.emit("subscribe_user_ressources"); }); diff --git a/app/templates/admin/user.html.j2 b/app/templates/admin/user.html.j2 index 6bc49613..d54fdd9e 100644 --- a/app/templates/admin/user.html.j2 +++ b/app/templates/admin/user.html.j2 @@ -100,9 +100,8 @@ {% endblock %} diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2 index b4a6b9e9..d548207a 100644 --- a/app/templates/base.html.j2 +++ b/app/templates/base.html.j2 @@ -20,14 +20,6 @@ -
@@ -105,5 +97,15 @@ +