Hi id like that the color of the theme remains permanet when user go to another page, or when users left the web site and then return. I think that the way is with cookies, but i dont know how to do, thanks.
function swapStyleSheet(sheet){
document.getElementById('pagestyle').setAttribute('href', sheet);
}
<p class="copyright theme">
<a onclick="swapStyleSheet('css/dark.css')" href="#">Dark theme</a>
<a onclick="swapStyleSheet('css/style.css')" href="#">Light theme</a>
</p>
How i can implement with local storage?