Debug hash url lors de l'envoi des réponses à un quiz via navigateurs chrome/webkit

This commit is contained in:
Fabrice PENHOËT 2021-01-12 16:15:59 +01:00
parent d7cfefd23b
commit dc7ae255e9
1 changed files with 2 additions and 3 deletions

View File

@ -37,7 +37,6 @@ const beginAnswer = () =>
{ {
chronoBegin=Date.now(); chronoBegin=Date.now();
btnSubmit.style.display="block"; btnSubmit.style.display="block";
const here=window.location;// window.location à ajouter pour ne pas quitter la page en mode "preview".
} }
let isConnected, user; let isConnected, user;
@ -138,7 +137,7 @@ myForm.addEventListener("submit", function(e)
// Puis on le redirige vers son résultat : // Puis on le redirige vers son résultat :
window.location.hash=""; window.location.hash="";
const here=window.location;// window.location à ajouter pour ne pas quitter la page en mode "preview"... const here=window.location;// window.location à ajouter pour ne pas quitter la page en mode "preview"...
window.location.assign(here+"explanations"); window.location.hash="explanations";
} }
} }
xhrSaveAnswer.setRequestHeader("Authorization", "Bearer "+user.token); xhrSaveAnswer.setRequestHeader("Authorization", "Bearer "+user.token);
@ -159,7 +158,7 @@ myForm.addEventListener("submit", function(e)
// Puis on le redirige vers son résultat : // Puis on le redirige vers son résultat :
window.location.hash=""; window.location.hash="";
const here=window.location;// window.location à ajouter pour ne pas quitter la page en mode "preview"... const here=window.location;// window.location à ajouter pour ne pas quitter la page en mode "preview"...
window.location.assign(here+"response"); window.location.hash="response";
} }
// + Affichage des textes d'explications pour chaque question // + Affichage des textes d'explications pour chaque question
const explanations=document.querySelectorAll(".help"); const explanations=document.querySelectorAll(".help");