From 692b887d99c6c66e07e7a876daf10f15d9cb489d Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Tue, 4 Feb 2020 10:10:22 +0100 Subject: [PATCH] Add some documentation and code style --- app/static/js/nopaque.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/static/js/nopaque.js b/app/static/js/nopaque.js index 3c3d9309..56c42cd3 100644 --- a/app/static/js/nopaque.js +++ b/app/static/js/nopaque.js @@ -1,6 +1,9 @@ +/* + * The nopaque object is used as a namespace for nopaque specific functions and + * variables. + */ var nopaque = {}; - // nopaque ressources nopaque.socket = io(); @@ -28,7 +31,6 @@ nopaque.forms.init = function() { progressModal = M.Modal.getInstance(progressModalElement); progressModal.options.dismissible = false; abortRequestElement = progressModalElement.querySelector(".abort-request"); - // just use request.abort? abortRequestElement.addEventListener("click", function() {request.abort();}); progressElement = progressModalElement.querySelector(".determinate"); } @@ -87,8 +89,7 @@ nopaque.navigation.init = function() { nopaque.toast = function(message, color="") { - var toast; - var toastActionElement; + var toast, toastActionElement; toast = M.toast({classes: color, html: `${message}