Skip to content

Instantly share code, notes, and snippets.

@hayleyxyz
Created June 25, 2021 18:42
Show Gist options
  • Save hayleyxyz/3afac95ccc59dacf69d3c73e688dad8b to your computer and use it in GitHub Desktop.
Save hayleyxyz/3afac95ccc59dacf69d3c73e688dad8b to your computer and use it in GitHub Desktop.
getTitles = () => {
return $$('.info [itemprop="name"]').map((el) => el.title);
};
season = document.querySelector('#bySeason').selectedOptions[0].textContent.trim();
obj = {};
if (localStorage.getItem('aci')) {
obj = JSON.parse(localStorage.getItem('aci'));
}
obj[season] = getTitles();
localStorage.setItem('aci', JSON.stringify(obj));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment