Ensure custom theme prefs are saved

This commit is contained in:
Maciej Pędzich 2023-01-21 23:57:39 +01:00
parent a451756815
commit 96fef514a2

View File

@ -60,6 +60,11 @@ const metaTagTitle = `${title} - Spotify Playlist Archive`;
} else {
document.documentElement.setAttribute('data-theme', 'dark');
}
localStorage.setItem(
'theme',
document.documentElement.getAttribute('data-theme')
);
};
</script>
</head>