You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.0 KiB
88 lines
2.0 KiB
/*var color = 'normal';
|
|
var nb = 0;
|
|
|
|
function changeColorMode() {
|
|
let selectColor = document.getElementById('color-selector');
|
|
selectColor.addEventListener('change', function() {
|
|
var index = selectColor.selectedIndex;
|
|
// Rapporter cette donnée au <p>
|
|
if (index != null){
|
|
nb= index;
|
|
}
|
|
|
|
})
|
|
/* if(color !== selectColor.value){
|
|
color = selectColor.value;
|
|
}
|
|
return nb;
|
|
|
|
}
|
|
|
|
|
|
console.log(nb);
|
|
/*var nb = 0;
|
|
|
|
let selectColor = document.getElementById('color-selector');
|
|
|
|
selectColor.addEventListener('change', function() {
|
|
var index = selectColor.selectedIndex;
|
|
// Rapporter cette donnée au <p>
|
|
if (index != null){
|
|
nb= index;
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
*/
|
|
|
|
var popupSettings = document.getElementById('popupSettings');
|
|
var popupExplain = document.getElementById('popupExplain');
|
|
|
|
window.onclick = function(event) {
|
|
if (event.target === popupSettings) {
|
|
popupSettings.style.display = "none";
|
|
saveSettings();
|
|
}
|
|
if (event.target === popupExplain) {
|
|
popupExplain.style.display = "none";
|
|
}
|
|
}
|
|
|
|
function showSettings(){
|
|
document.getElementById('popupSettings').style.display='block';
|
|
}
|
|
|
|
function showExplain(){
|
|
document.getElementById('popupExplain').style.display='block';
|
|
}
|
|
|
|
|
|
|
|
function showGame(){
|
|
document.getElementById('game').style.display='block';
|
|
document.getElementById('playBtn').style.display='none';
|
|
}
|
|
|
|
|
|
function closeExplainPopup() {
|
|
document.getElementById('popupExplain').style.display='none';
|
|
}
|
|
|
|
function closeSettingsPopup() {
|
|
document.getElementById('popupSettings').style.display='none';
|
|
saveSettings();
|
|
}
|
|
|
|
|
|
function saveSettings(){
|
|
localStorage.setItem('isDarkTheme', isDarkTheme);
|
|
localStorage.setItem('isDysFontActive', isDysFontActive);
|
|
localStorage.setItem('isBackgroundAnimated', isBackgroundAnimated);
|
|
localStorage.setItem('lang', lang);
|
|
localStorage.setItem('shapeColorOne', shapeColorOne);
|
|
localStorage.setItem('shapeColorTwo', shapeColorTwo);
|
|
}
|
|
|