I have solve a solution that make conditional to know if I'm NOT in the index page, the background image of an element should be none. How can I do this without need to write the page domain? A solution better than this:
if(window.location.href != 'http://example.com/'){
document.querySelector('.menu-principal')
.style.backgroundImage = 'none'
}
I'm only want to know if I'm in the index page or Not, without need to write the page domain.
//beforemysitemysite.compart of it, just change toexample.comand it will be accepted (hope that's OK)