Add some documentation and code style

This commit is contained in:
Patrick Jentsch 2020-02-04 10:10:22 +01:00
parent 1d47e38780
commit 692b887d99

View File

@ -1,6 +1,9 @@
/*
* The nopaque object is used as a namespace for nopaque specific functions and
* variables.
*/
var nopaque = {}; var nopaque = {};
// nopaque ressources // nopaque ressources
nopaque.socket = io(); nopaque.socket = io();
@ -28,7 +31,6 @@ nopaque.forms.init = function() {
progressModal = M.Modal.getInstance(progressModalElement); progressModal = M.Modal.getInstance(progressModalElement);
progressModal.options.dismissible = false; progressModal.options.dismissible = false;
abortRequestElement = progressModalElement.querySelector(".abort-request"); abortRequestElement = progressModalElement.querySelector(".abort-request");
// just use request.abort?
abortRequestElement.addEventListener("click", function() {request.abort();}); abortRequestElement.addEventListener("click", function() {request.abort();});
progressElement = progressModalElement.querySelector(".determinate"); progressElement = progressModalElement.querySelector(".determinate");
} }
@ -87,8 +89,7 @@ nopaque.navigation.init = function() {
nopaque.toast = function(message, color="") { nopaque.toast = function(message, color="") {
var toast; var toast, toastActionElement;
var toastActionElement;
toast = M.toast({classes: color, toast = M.toast({classes: color,
html: `<span>${message}</span> html: `<span>${message}</span>