Skip to content

Commit

Permalink
Fix debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yannis300307 committed Dec 15, 2024
1 parent 6965335 commit 10c50e7
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions frontend/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,14 @@ async function updateProviders() {
});

remoteProviders.forEach(provider => { // Pour remote
var option = document.createElement('option');
option.value = "r-" + provider;
option.innerText = "R: " + provider;
if (provider !== "Debug" || debug_mode) {
var option = document.createElement('option');
option.value = "r-" + provider;
option.innerText = "R: " + provider;

providersCombo.appendChild(option);
centralProvidersCombo.appendChild(option.cloneNode(true));
providersCombo.appendChild(option);
centralProvidersCombo.appendChild(option.cloneNode(true));
}
});
}

Expand Down Expand Up @@ -938,18 +940,18 @@ function validateCookies() {
function checkCookiesAccepted() {
const cookies = document.cookie.split("; ");

var data = "";
var data = "";

for (var i = 0; i < cookies.length; i++) {
if (cookies[i].substring(0, 16) === "cookiesAccepted=") {
data = cookies[i].substring(16);
}
for (var i = 0; i < cookies.length; i++) {
if (cookies[i].substring(0, 16) === "cookiesAccepted=") {
data = cookies[i].substring(16);
}
}

if (data !== "true") {
let cookiesPopup = document.getElementById("cookies-info-popup");
cookiesPopup.style.display = "block";
}
if (data !== "true") {
let cookiesPopup = document.getElementById("cookies-info-popup");
cookiesPopup.style.display = "block";
}
}

window.addEventListener("click", () => {
Expand Down

0 comments on commit 10c50e7

Please sign in to comment.