If no divPageNavigation

This commit is contained in:
Rafael Tavares Juliani 2023-10-21 04:35:09 -03:00
parent d68c84873f
commit 7cd504974a

View File

@ -109,7 +109,7 @@ window.onload = (event) => {
if (luz_apagada && !modo_escuro) { if (luz_apagada && !modo_escuro && divPageNavigation) {
divPageNavigation.style.background = tipo_de_papel[obj[1]]; divPageNavigation.style.background = tipo_de_papel[obj[1]];
@ -399,7 +399,7 @@ window.onload = (event) => {
salvarOpcoesUsuario('papel', indiceTipoPapel); salvarOpcoesUsuario('papel', indiceTipoPapel);
if (luz_apagada){ if (luz_apagada && divPageNavigation){
divPageNavigation.style.background = tipo_de_papel[indiceTipoPapel]; divPageNavigation.style.background = tipo_de_papel[indiceTipoPapel];
@ -413,8 +413,13 @@ window.onload = (event) => {
quartoContent.classList.remove('luz_apagada'); quartoContent.classList.remove('luz_apagada');
if(divPageNavigation){
divPageNavigation.style.removeProperty('background'); divPageNavigation.style.removeProperty('background');
}
sidebar.style.removeProperty('color') sidebar.style.removeProperty('color')
sidebar.classList.remove('luz_apagada'); sidebar.classList.remove('luz_apagada');
sidebarItemContainer.forEach(item => { sidebarItemContainer.forEach(item => {
@ -445,8 +450,13 @@ window.onload = (event) => {
quartoContent.classList.add('luz_apagada'); quartoContent.classList.add('luz_apagada');
if(divPageNavigation){
divPageNavigation.style.backgroundColor = tipo_de_papel[indiceTipoPapel]; divPageNavigation.style.backgroundColor = tipo_de_papel[indiceTipoPapel];
}
papel.style.background = tipo_de_papel[indiceTipoPapel]; papel.style.background = tipo_de_papel[indiceTipoPapel];
sidebar.style.color = '#fff' sidebar.style.color = '#fff'