diff --git a/Flask/static/js/main.js b/Flask/static/js/main.js index 5758551..85c4286 100644 --- a/Flask/static/js/main.js +++ b/Flask/static/js/main.js @@ -4,9 +4,7 @@ function addline(ligne){ } -function change_discord(value) { - data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON - +function change_discord(value, data) { if (value == "{{len}}"){ document.getElementById("name").value = ""; document.getElementById("submit").value = "Create !"; @@ -26,8 +24,7 @@ function change_discord(value) { } } -function change_config(value) { - data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON +function change_config(value, data) { document.getElementById("delete").style.visibility = "hidden"; if (value == "{{len}}"){ document.getElementById("submit").value = "Create !"; @@ -73,6 +70,5 @@ function change_proxy(value, data) { function change_logs(value) { - console.log(value); document.getElementById("embed").src = "/static/logs/" + value + ".txt"; } diff --git a/Flask/templates/config.html b/Flask/templates/config.html index 3312c2a..6396921 100644 --- a/Flask/templates/config.html +++ b/Flask/templates/config.html @@ -42,17 +42,16 @@ {% block content %} + {%if not current_user.is_authenticated %} {% else %}