129 lines
7.4 KiB
HTML
129 lines
7.4 KiB
HTML
<html>
|
|
<style>
|
|
body {
|
|
background-color: black;
|
|
color: white;
|
|
}
|
|
button {
|
|
margin-right: 20px;
|
|
display: block;
|
|
background-color: black;
|
|
color: white;
|
|
}
|
|
tr {
|
|
height: 30px;
|
|
}
|
|
label {
|
|
text-align: center;
|
|
display: block;
|
|
}
|
|
textarea {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
.main {
|
|
width:50vw;
|
|
padding-top:10vw;
|
|
margin:auto;
|
|
display:block;
|
|
}
|
|
.footer {
|
|
width:50vw;
|
|
position: fixed;
|
|
bottom: 5vh;
|
|
left: 25vw;
|
|
}
|
|
</style>
|
|
<body onload="get_ignores()">
|
|
<div class="main">
|
|
<table>
|
|
<tr>
|
|
<td><button onClick="pickem('0')">Pick a Poke</button></td><td id="0"></td><td><button onClick="ignorem('0')">Mark used</button></td>
|
|
</tr>
|
|
<tr>
|
|
<td><button onClick="pickem('1')">Pick a Poke</button></td><td id="1"></td><td><button onClick="ignorem('1')">Mark used</button></td>
|
|
</tr>
|
|
<tr>
|
|
<td><button onClick="pickem('2')">Pick a Poke</button></td><td id="2"></td><td><button onClick="ignorem('2')">Mark used</button></td>
|
|
</tr>
|
|
<tr>
|
|
<td><button onClick="pickem('3')">Pick a Poke</button></td><td id="3"></td><td><button onClick="ignorem('3')">Mark used</button></td>
|
|
</tr>
|
|
<tr>
|
|
<td><button onClick="pickem('4')">Pick a Poke</button></td><td id="4"></td><td><button onClick="ignorem('4')">Mark used</button></td>
|
|
</tr>
|
|
<tr>
|
|
<td><button onClick="pickem('5')">Pick a Poke</button></td><td id="5"></td><td><button onClick="ignorem('5')">Mark used</button></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td><td><button onClick="reset()">Clear current team</button></td><td><button onClick="ignore_team()">Mark team used</button></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="footer">
|
|
<label>Used Pokes</label>
|
|
<textarea id="ignored_pkmn" onblur="get_ignores()"></textarea>
|
|
<button style="display:block; margin:auto;" onClick="copy_used()">Copy Used Pokes</button>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
var pkmn=['Abra', 'Aerodactyl', 'Aipom', 'Alakazam', 'Ampharos', 'Arbok', 'Arcanine', 'Ariados', 'Articuno', 'Azumarill', 'Bayleef', 'Beedrill', 'Bellossom', 'Bellsprout', 'Blastoise', 'Blissey', 'Bulbasaur', 'Butterfree', 'Caterpie', 'Chansey', 'Charizard', 'Charmander', 'Charmeleon', 'Chikorita', 'Chinchou', 'Clefable', 'Clefairy', 'Cleffa', 'Cloyster', 'Corsola', 'Crobat', 'Croconaw', 'Cubone', 'Cyndaquil', 'Delibird', 'Dewgong', 'Diglett', 'Ditto', 'Dodrio', 'Doduo', 'Donphan', 'Dragonair', 'Dragonite', 'Dratini', 'Drowzee', 'Dugtrio', 'Dunsparce', 'Eevee', 'Ekans', 'Electabuzz', 'Electrode', 'Elekid', 'Entei', 'Espeon', 'Exeggcute', 'Exeggutor', "Farfetch'd", 'Fearow', 'Feraligatr', 'Flaaffy', 'Flareon', 'Forretress', 'Furret', 'Gastly', 'Gengar', 'Geodude', 'Girafarig', 'Gligar', 'Gloom', 'Golbat', 'Goldeen', 'Golduck', 'Golem', 'Granbull', 'Graveler', 'Grimer', 'Growlithe', 'Gyarados', 'Haunter', 'Heracross', 'Hitmonchan', 'Hitmonlee', 'Hitmontop', 'Ho-Oh', 'Hoothoot', 'Hoppip', 'Horsea', 'Houndoom', 'Houndour', 'Hypno', 'Igglybuff', 'Ivysaur', 'Jigglypuff', 'Jolteon', 'Jumpluff', 'Jynx', 'Kabuto', 'Kabutops', 'Kadabra', 'Kakuna', 'Kangaskhan', 'Kingdra', 'Kingler', 'Koffing', 'Krabby', 'Lanturn', 'Lapras', 'Larvitar', 'Ledian', 'Ledyba', 'Lickitung', 'Machamp', 'Machoke', 'Machop', 'Magby', 'Magcargo', 'Magikarp', 'Magmar', 'Magnemite', 'Magneton', 'Mankey', 'Mantine', 'Mareep', 'Marill', 'Marowak', 'Meganium', 'Meowth', 'Metapod', 'Miltank', 'Misdreavus', 'Moltres', 'Mr. Mime', 'Muk', 'Murkrow', 'Natu', 'Nidoking', 'Nidoqueen', 'Nidoran-F', 'Nidoran-M', 'Nidorina', 'Nidorino', 'Ninetales', 'Noctowl', 'Octillery', 'Oddish', 'Omanyte', 'Omastar', 'Onix', 'Paras', 'Parasect', 'Persian', 'Phanpy', 'Pichu', 'Pidgeot', 'Pidgeotto', 'Pidgey', 'Pikachu', 'Piloswine', 'Pineco', 'Pinsir', 'Politoed', 'Poliwag', 'Poliwhirl', 'Poliwrath', 'Ponyta', 'Porygon', 'Porygon2', 'Primeape', 'Psyduck', 'Pupitar', 'Quagsire', 'Quilava', 'Qwilfish', 'Raichu', 'Raikou', 'Rapidash', 'Raticate', 'Rattata', 'Remoraid', 'Rhydon', 'Rhyhorn', 'Sandshrew', 'Sandslash', 'Scizor', 'Scyther', 'Seadra', 'Seaking', 'Seel', 'Sentret', 'Shellder', 'Shuckle', 'Skarmory', 'Skiploom', 'Slowbro', 'Slowking', 'Slowpoke', 'Slugma', 'Smeargle', 'Smoochum', 'Sneasel', 'Snorlax', 'Snubbull', 'Spearow', 'Spinarak', 'Squirtle', 'Stantler', 'Starmie', 'Staryu', 'Steelix', 'Sudowoodo', 'Suicune', 'Sunflora', 'Sunkern', 'Swinub', 'Tangela', 'Tauros', 'Teddiursa', 'Tentacool', 'Tentacruel', 'Togepi', 'Togetic', 'Totodile', 'Typhlosion', 'Tyranitar', 'Tyrogue', 'Umbreon', 'Unown', 'Ursaring', 'Vaporeon', 'Venomoth', 'Venonat', 'Venusaur', 'Victreebel', 'Vileplume', 'Voltorb', 'Vulpix', 'Wartortle', 'Weedle', 'Weepinbell', 'Weezing', 'Wigglytuff', 'Wobbuffet', 'Wooper', 'Xatu', 'Yanma', 'Zapdos', 'Zubat'];
|
|
var ignored_pkmn=[];
|
|
var picked = [null, null, null, null, null, null];
|
|
|
|
function get_ignores () {
|
|
var ignores = document.getElementById("ignored_pkmn").value;
|
|
ignored_pkmn = ignores.split("\n").filter(line => line !== "").sort();
|
|
}
|
|
|
|
function pickem (id) {
|
|
var available = pkmn.filter(i => !ignored_pkmn.includes(i) & !picked.includes(i));
|
|
var ix = Math.floor(Math.random()*available.length);
|
|
var elem = document.getElementById(id);
|
|
elem.innerHTML = available[ix];
|
|
picked[Number(id)] = available[ix]
|
|
elem.style.color = "white";
|
|
}
|
|
|
|
function ignorem (id) {
|
|
var elem = document.getElementById(id);
|
|
var to_ignore = elem.innerHTML;
|
|
if (!ignored_pkmn.includes(to_ignore)) {
|
|
ignored_pkmn[ignored_pkmn.length] = to_ignore;
|
|
ignored_pkmn.sort();
|
|
document.getElementById("ignored_pkmn").value = ignored_pkmn.join("\n");
|
|
elem.style.color = "red";
|
|
}
|
|
}
|
|
|
|
function ignore_team () {
|
|
for (i=0; i<6; i++) {
|
|
var elem = document.getElementById(i.toString());
|
|
var to_ignore = elem.innerHTML;
|
|
document.getElementById(i.toString()).innerHTML = "";
|
|
if (!ignored_pkmn.includes(to_ignore)) {
|
|
ignored_pkmn[ignored_pkmn.length] = to_ignore;
|
|
}
|
|
picked[i] = null;
|
|
elem.style.color = "white";
|
|
}
|
|
ignored_pkmn.sort();
|
|
document.getElementById("ignored_pkmn").value = ignored_pkmn.join("\n");
|
|
}
|
|
|
|
function reset () {
|
|
for (i=0; i<6; i++) {
|
|
var elem = document.getElementById(i.toString());
|
|
elem.innerHTML = "";
|
|
picked[i] = null;
|
|
elem.style.color = "white";
|
|
}
|
|
}
|
|
|
|
function copy_used() {
|
|
document.getElementById("ignored_pkmn").select();
|
|
document.execCommand("copy");
|
|
}
|
|
</script>
|
|
</html>
|