Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Save/Load Selected Pokemon on
// Visit and select which pokemon you want to see via the filter dropdown.
// After you are happy with your selection, open the console[0] while
// Copy and paste either the save or load code below.
// [0] -
// Save selected pokemon
var selectedPokemon = [];
$('.dropdown-menu.inner li.selected').each(function(_, el){
localStorage.setItem('selectedPokemon', JSON.stringify(selectedPokemon));
// Load selected pokemon
var selectedPokemon = JSON.parse(localStorage.selectedPokemon);
selectedPokemon.forEach(function(pokemonId) {
$('.dropdown-menu.inner li[data-original-index=' + pokemonId + '] a').click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment