Widget:Test: mudanças entre as edições

De PokeXGames
Ir para navegação Ir para pesquisar
Sem resumo de edição
Etiqueta: Revertido
Sem resumo de edição
 
(205 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
<script>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Busca de Imagens por Nome</title>
    <style>
        .input-group { margin-bottom: 1em; position: relative; }
        .dropdown {
            border: 1px solid #ccc;
            display: none;
            position: absolute;
            background-color: #fff;
            z-index: 1000;
            max-height: 150px;
            overflow-y: auto;
            width: 100%;
        }
        .dropdown-item {
            padding: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
        }
        .dropdown-item img {
            margin-right: 10px;
        }
        .dropdown-item:hover {
            background-color: #f0f0f0;
        }
        .image-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        .image-item {
            margin-bottom: 1em;
            text-align: center;
        }
        .image-item img {
            display: block;
            margin: 0 auto;
        }


const optionsImageBibliotecaChosenOnez = [
        .variations-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 1em;
        }


    {
        .variation-item {
        label: " ʺEp. Ariados, Amigosʺ, ʺEp. Wake Up Snorlax!ʺ",
            width: 35%;
        image: "https://wiki.pokexgames.com/images/7/77/3538%2C_5020%2C_9.png",
            box-sizing: border-box;
         obs: "<center><b>(3538, 5020, 9)</b></center>"
            margin: 5px;
     },
            text-align: center;
    {
            border: 1px solid ;
         label: " ʺEp. Beauty and the Breederʺ, ʺEp. Mantine Overboard!ʺ",
            padding: 10px;
        image: " https://wiki.pokexgames.com/images/d/dd/3540%2C_5020%2C_9.png",
        }
         obs: "<center><b>(3540, 5020, 9)</b></center>"
 
     },
        .variation-item img {
    {
            display: block;
        label: " ʺEp. Pokémon Shipwreckʺ, ʺEp. The Mystery Menaceʺ",
            margin: 0 auto 10px;
        image: "https://wiki.pokexgames.com/images/d/d4/3542%2C_5020%2C_9.png ",
        }
        obs: "<center><b>(3542, 5020, 9)</b></center>"
 
    },
        .swap-button {
    {  
            margin-top: 10px;
        label: " ʺEp. Gettinˈ The Bugs Outʺ, ʺEp. The Trouble With Snubbullʺ",
            cursor: pointer;
        image: "https://wiki.pokexgames.com/images/0/00/3547%2C_5020%2C_9.png ",
            width: 15px;
        obs: "<center><b>(3547, 5020, 9)</b></center>"
            height: 15px;
    },
            background: url('https://wiki.pokexgames.com/images/f/fb/SwapButtonAddons.png') no-repeat center;
    {
            background-size: contain;
        label: " ʺEp. Clefairy and The Moon Stoneʺ, ʺEp. Octillery The Outcastʺ",
            display: block;
        image: " https://wiki.pokexgames.com/images/2/2a/3549%2C_5020%2C_9.png",
            margin: 0 auto;
        obs: "<center><b>(3549, 5020, 9)</b></center>"
         }
    },
    </style>
    {  
</head>
        label: " ʺEp. Plant it Now... Diglett Laterʺ, ʺEp. Misty Meets Her Matchʺ",
<body>
        image: " https://wiki.pokexgames.com/images/5/51/3540%2C_5023%2C_9.png",
     <form id="imageForm">
        obs: "<center><b>(3540, 5023, 9)</b></center>"
         <div class="input-group">
    },
            <input type="text" id="imageSearch" placeholder="Digite o nome da imagem" autocomplete="off">
    {
            <div id="dropdown" class="dropdown"></div>
        label: " ʺEp. Showdown in Pewter Cityʺ, ʺEp. Spring Feverʺ",
        </div>
        image: "https://wiki.pokexgames.com/images/0/07/3542%2C_5023%2C_9.png ",
 
        obs: "<center><b>(3542, 5023, 9)</b></center>"
         <div id="imageContainer" class="image-container hidden">
    },
            <!-- As imagens e suas informações serão exibidas aqui -->
    {  
        </div>
        label: " ʺEp. Lights, Camera, Quack-tionʺ, ʺEp. The Crystal Onixʺ",
    </form>
        image: " https://wiki.pokexgames.com/images/4/44/3547%2C_5023%2C_9.png",
 
        obs: "<center><b>(3547, 5023, 9)</b></center>"
     <script>
    },
        const imageList = {
    {
            'Squirtle': {
        label: " ʺEp. The Dunsparce Deceptionʺ, ʺEp. The Kecleon Caperʺ",
                imageUrl: 'https://wiki.pokexgames.com/images/7/7a/007-Squirtle.png',  
        image: "https://wiki.pokexgames.com/images/f/f5/3549%2C_5023%2C_9.png ",
                variations: [
        obs: "<center><b>(3549, 5023, 9)</b></center>"
                    {
    },
                        description: 'Squirtle Purple Ninja Pack',
    {  
                        descriptionIMG: 'https://wiki.pokexgames.com/images/c/c1/Purple_Stripe.png',
        label: " ʺEp. Forest Grumpsʺ, ʺEp. The Underground Round Upʺ",
                        obtain: {
        image: "https://wiki.pokexgames.com/images/d/de/3539%2C_5026%2C_9.png ",
                            url: 'https://wiki.pokexgames.com/index.php/Craft_Profissões_-_Estilista#Rank_E',
        obs: "<center><b>(3539, 5026, 9)</b></center>"
                            text: 'Estilista'
    },
                        },
    {
                        additionalImages: [
        label: " ʺEp. A Hot Water Battleʺ, ʺEp. The Rivalry Revivalʺ",
                            { url: 'https://wiki.pokexgames.com/images/d/dd/Squirtle_Purple_Ninja_Pack_Frente.png'}, // Frente
        image: " https://wiki.pokexgames.com/images/e/e7/3541%2C_5026%2C_9.png",
                            { url: 'https://wiki.pokexgames.com/images/5/50/Squirtle_Purple_Ninja_Pack_Esquerda.png'}, // Lado Esquerdo
         obs: "<center><b>(3541, 5026, 9)</b></center>"
                            { url: 'https://wiki.pokexgames.com/images/a/af/Squirtle_Purple_Ninja_Pack_Direita.png'}, // Costas
    },
                            { url: 'https://wiki.pokexgames.com/images/5/5d/Squirtle_Purple_Ninja_Pack_Costas.png'}  // Lado Direito
    {  
                        ]
         label: " ʺEp. Make Room for Gloomʺ, ʺEp. Doinˈ What Comes Natu-rallyʺ",
                    },
        image: "https://wiki.pokexgames.com/images/b/be/3539%2C_5029%2C_9.png ",
                    {
        obs: "<center><b>(3539, 5029, 9)</b></center>"
                        description: 'Squirtle Red Ninja Pack',
    },
                        descriptionIMG: 'https://wiki.pokexgames.com/images/c/c1/Purple_Stripe.png',
    {
                        obtain: {
        label: " ʺEp. A Bout With Sproutʺ, ʺEp. The Stun Spore Detourʺ",
                            url: 'https://wiki.pokexgames.com/index.php/Craft_Profissões_-_Estilista#Rank_E',
        image: " https://wiki.pokexgames.com/images/e/ec/3541%2C_5029%2C_9.png",
                            text: 'Estilista'
        obs: "<center><b>(3541, 5029, 9)</b></center>"
                        },
    },
                        additionalImages: [
    {  
                            { url: 'https://wiki.pokexgames.com/images/1/13/Squirtle_Red_Ninja_Pack_Frente.png'}, // Frente
        label: " ʺEp. Tracey Gets Buggedʺ, ʺEp. Abra and the Psychic Showdownʺ",
                            { url: 'https://wiki.pokexgames.com/images/1/1e/Squirtle_Red_Ninja_Pack_Esquerda.png'}, // Lado Esquerdo
        image: "https://wiki.pokexgames.com/images/f/f1/3539%2C_5032%2C_9.png ",
                            { url: 'https://wiki.pokexgames.com/images/0/01/Squirtle_Red_Ninja_Pack_Costas.png'}, // Costas
         obs: "<center><b>(3539, 5032, 9)</b></center>"
                            { url: 'https://wiki.pokexgames.com/images/f/fd/Squirtle_Red_Ninja_Pack_Direita.png'}  // Lado Direito
    },
                        ]
    {
                    }
        label: " ʺEp. Battle Aboard the St. Anneʺ, ʺEp. For Cryinˈ Out Loud!ʺ",
                ]
        image: "https://wiki.pokexgames.com/images/4/40/3541%2C_5032%2C_9.png ",
            },
         obs: "<center><b>(3541, 5032, 9)</b></center>"
         };
     },
 
     {  
        const imageSearch = document.getElementById('imageSearch');
         label: " ʺEp. The Path to The Pokémon Leagueʺ, ʺEp. Type Castingʺ",
        const dropdown = document.getElementById('dropdown');
         image: "https://wiki.pokexgames.com/images/5/58/3539%2C_5036%2C_9.png ",
        const imageContainer = document.getElementById('imageContainer');
         obs: "<center><b>(3539, 5036, 9)</b></center>"
 
    },
         imageSearch.addEventListener('input', function() {
    {
            const searchValue = this.value.trim().toLowerCase();
        label: " ʺEp. Tentacool & Tentacruelʺ, ʺEp. The Breeding Center Secretʺ",
            dropdown.innerHTML = '';
        image: " https://wiki.pokexgames.com/images/7/70/3541%2C_5036%2C_9.png",
 
        obs: "<center><b>(3541, 5036, 9)</b></center>"
            if (searchValue) {
    },
                Object.keys(imageList).forEach(imageName => {
    {  
                    if (imageName.toLowerCase().includes(searchValue)) {
        label: " ʺEp. Chikoritaˈs Big Upsetʺ, ʺEp. Hi Ho Silver... Away!ʺ",
                        const dropdownItem = document.createElement('div');
        image: "https://wiki.pokexgames.com/images/4/4b/3539%2C_5039%2C_9.png ",
                        dropdownItem.classList.add('dropdown-item');
        obs: "<center><b>(3539, 5039, 9)</b></center>"
                       
    },
                        const imgElement = document.createElement('img');
    {
                        imgElement.src = imageList[imageName].imageUrl;
        label: " ʺEp. Freeze Frameʺ, ʺEp. The Art of Pokémonʺ",
                        imgElement.alt = imageName;
        image: "https://wiki.pokexgames.com/images/6/6a/3541%2C_5039%2C_9.png ",
                       
        obs: "<center><b>(3541, 5039, 9)</b></center>"
                        dropdownItem.appendChild(imgElement);
     },
                        dropdownItem.appendChild(document.createTextNode(imageName));
     {  
                       
        label: " ʺEp. Pokémon! I Choose You!ʺ, ʺEp. Hour of the Houndourʺ",
                        dropdownItem.addEventListener('click', function() {
        image: "https://wiki.pokexgames.com/images/0/04/3543%2C_5043%2C_9.png ",
                            showImageInfo(imageName);
         obs: "<center><b>(3543, 5043, 9)</b></center>"
                            dropdown.style.display = 'none';
    },
                        });
    {
                        dropdown.appendChild(dropdownItem);
         label: " ʺEp. The Poké Spokesmanʺ, ʺEp. The Flame Pokémon-athonʺ",
                    }
        image: "https://wiki.pokexgames.com/images/6/64/3543%2C_5041%2C_9.png ",
                });
        obs: "<center><b>(3543, 5041, 9)</b></center>"
 
    },
                dropdown.style.display = dropdown.childNodes.length ? 'block' : 'none';
    {  
            } else {
        label: " ʺEp. Tunnel Visionʺ, ʺEp. Got Miltank?ʺ",
                dropdown.style.display = 'none';
        image: "https://wiki.pokexgames.com/images/9/99/3547%2C_5043%2C_9.png ",
            }
        obs: "<center><b>(3547, 5043, 9)</b></center>"
         });
    },
 
    {
        document.addEventListener('click', function(event) {
        label: " ʺEp. Fossil Foolsʺ, ʺEp. Enter The Dragoniteʺ",
            if (!imageSearch.contains(event.target) && !dropdown.contains(event.target)) {
        image: " https://wiki.pokexgames.com/images/0/08/3547%2C_5041%2C_9.png ",
                dropdown.style.display = 'none';
        obs: "<center><b>(3547, 5041, 9)</b></center>"
            }
    },
         });
    {  
 
        label: " ʺEp. Carrying Onʺ, ʺEp. A Parent Trapped!ʺ",
function showImageInfo(imageName) {
        image: " https://wiki.pokexgames.com/images/c/c3/3560%2C_5041%2C_9.png ",
     const imageInfo = imageList[imageName];
        obs: "<center><b>(3560, 5041, 9)</b></center>"
     let imagesHtml = `
    },
         <div class="image-item">
    {  
            <img src="${imageInfo.imageUrl}" alt="${imageName}">
        label: " ʺEp. The Water Flowers of Cerulean Cityʺ, ʺEp. Pokémon Paparazziʺ",
         </div>
        image: " https://wiki.pokexgames.com/images/a/ad/3564%2C_5043%2C_9.png",
        <div class="variations-container">
        obs: "<center><b>(3564, 5043, 9)</b></center>"
    `;
    },
 
    {
    imageInfo.variations.forEach((variation, index) => {
        label: " ʺEp. Pikachuˈs Goodbyeʺ, ʺEp. Snack Attackʺ",
         imagesHtml += `
        image: "  https://wiki.pokexgames.com/images/f/f9/3564%2C_5041%2C_9.png",
            <div class="variation-item">
        obs: "<center><b>(3564, 5041, 9)</b></center>"
                <img src="${variation.additionalImages[0].url}" alt="Variation Image" class="variation-image" data-variation-index="${index}" style="width: ${variation.additionalImages[0].width}px;">
    },
                <div class="swap-button" data-variation-index="${index}"></div><br>
    {  
                <div class="image-info">
        label: " ʺEp. Spinarak Attackʺ, ʺEp. The Joy of Water Pokémonʺ",
                    <img src="${variation.descriptionIMG}" alt="Description Image" style="margin-right: 5px; display: inline-block;"> <!-- Exibe a imagem antes da descrição -->
        image: "https://wiki.pokexgames.com/images/e/ef/3560%2C_5020%2C_9.png ",
                    <br> ${variation.description} <br> <!-- Descrição após a imagem -->
        obs: "<center><b>(3560, 5020, 9)</b></center>"
                    <b>Como Obter</b>: <a href="${variation.obtain.url}" target="_blank">${variation.obtain.text}</a>
    },
                </div>
    {
            </div>
        label: " ʺEp. Ignorance Is Blisseyʺ, ʺEp. Round Oneʺ",
        `;
        image: " https://wiki.pokexgames.com/images/2/27/3561%2C_5020%2C_9.png",
     });
        obs: "<center><b>(3561, 5020, 9)</b></center>"
 
    },
     imagesHtml += '</div>';
    {
 
        label: " ʺEp. Right On, Rhydon!ʺ, ʺEp. Begin!ʺ",
    imageContainer.innerHTML = imagesHtml;
        image: "https://wiki.pokexgames.com/images/f/ff/3562%2C_5020%2C_9.png ",
    imageContainer.classList.remove('hidden');
        obs: "<center><b>(3562, 5020, 9)</b></center>"
 
    },
    // Alternar imagens ao clicar no botão de troca
    {  
    const swapButtons = document.querySelectorAll('.swap-button');
        label: " ʺEp. Snow Way Outʺ, ʺEp. Foul Weather Friendsʺ",
 
        image: " https://wiki.pokexgames.com/images/4/47/3567%2C_5020%2C_9.png",
    swapButtons.forEach(button => {
        obs: "<center><b>(3567, 5020, 9)</b></center>"
         const index = button.getAttribute('data-variation-index');
    },
        const variation = imageInfo.variations[index];
    {
        let currentImageIndex = 0;
        label: " ʺEp. Hook, Line, and Stinkerʺ, ʺEp. The Joy of Pokémonʺ",
 
        image: "https://wiki.pokexgames.com/images/1/15/3569%2C_5020%2C_9.png ",
         button.addEventListener('click', () => {
        obs: "<center><b>(3569, 5020, 9)</b></center>"
            currentImageIndex = (currentImageIndex + 1) % variation.additionalImages.length;
    },
            const variationImage = button.previousElementSibling; // Atualiza a imagem da variação
    {
            variationImage.src = variation.additionalImages[currentImageIndex].url;
        label: " ʺEp. Dittoˈs Mysterious Mansionʺ, ʺEp. The Pokémon Water Warʺ",
            variationImage.style.width = `${variation.additionalImages[currentImageIndex].width}px`;
        image: " https://wiki.pokexgames.com/images/1/10/3571%2C_5020%2C_9.png",
        });
        obs: "<center><b>(3571, 5020, 9)</b></center>"
     });
    },
}
    {  
 
        label: " ʺEp. The Stolen Stones!ʺ, ʺEp. Two Hits and a Missʺ",
    </script>
        image: "https://wiki.pokexgames.com/images/f/f6/3560%2C_5023%2C_9.png ",
</body>
        obs: "<center><b>(3560, 5023, 9)</b></center>"
</html>
    },
    {
        label: " ʺEp. Mildˈn Wooleyʺ, ʺEp. Ash Catches a Pokémonʺ",
        image: " https://wiki.pokexgames.com/images/6/6e/3562%2C_5023%2C_9.png",   
        obs: "<center><b>(3562, 5023, 9)</b></center>"
    },
    {  
        label: " ʺEp. Pokémon Fashion Flashʺ, ʺEp. Illusion Confusionʺ",
        image: "https://wiki.pokexgames.com/images/6/68/3567%2C_5023%2C_9.png ",
        obs: "<center><b>(3567, 5023, 9)</b></center>"
    },
    {
        label: " ʺEp. Bye Bye Psyduckʺ, ʺEp. A Tents Situationʺ",
        image: " https://wiki.pokexgames.com/images/f/fa/3569%2C_5023%2C_9.png",
        obs: "<center><b>(3569, 5023, 9)</b></center>"
    },
    {
        label: " ʺEp. Here Comes The Squirtle Squadʺ, ʺEp. The Heartbreak of Brockʺ",
        image: " https://wiki.pokexgames.com/images/f/f9/3571%2C_5023%2C_9.png",
        obs: "<center><b>(3571, 5023, 9)</b></center>"
    },
    {  
        label: " ʺEp. Electric Shock Showdownʺ, ʺEp. Fighting Flyer with Fireʺ",
        image: " https://wiki.pokexgames.com/images/2/2e/3567%2C_5029%2C_9.png",
        obs: "<center><b>(3567, 5029, 9)</b></center>"
    },
    {
        label: " ʺEp. The Ninja Poké-Showdownʺ, ʺEp. The Double Trouble Headerʺ",
        image: "https://wiki.pokexgames.com/images/b/b6/3569%2C_5029%2C_9.png ",
        obs: "<center><b>(3569, 5029, 9)</b></center>"
    },
    {
        label: " ʺEp. Pokémon Scent-sation!ʺ, ʺEp. Go West Young Meowthʺ",
        image: " https://wiki.pokexgames.com/images/6/6a/3571%2C_5029%2C_9.png",
        obs: "<center><b>(3571, 5029, 9)</b></center>"
    },
    {  
        label: " ʺEp. Get Along, Little Pokémonʺ, ʺEp. The School of Hard Knocksʺ",
        image: "https://wiki.pokexgames.com/images/1/12/3567%2C_5032%2C_9.png ",
        obs: "<center><b>(3567, 5032, 9)</b></center>"
    },
    {
        label: " ʺEp. The Mandarin Island Miss-matchʺ, ʺEp. A Sappy Endingʺ",
        image: " https://wiki.pokexgames.com/images/6/6a/3569%2C_5032%2C_9.png",
        obs: "<center><b>(3569, 5032, 9)</b></center>"
    },
    {
        label: " ʺEp. Fly Me To The Moonʺ, ʺEp. Pallet Party Panicʺ",
        image: "https://wiki.pokexgames.com/images/d/de/3571%2C_5032%2C_9.png ",
        obs: "<center><b>(3571, 5032, 9)</b></center>"
    },
    {  
        label: " ʺEp. The Legend of Dratiniʺ, ʺEp. Fit To Be Tideʺ",
        image: "https://wiki.pokexgames.com/images/4/4e/3575%2C_5034%2C_9.png ",
        obs: "<center><b>(3575, 5034, 9)</b></center>"
    },
    {
        label: " ʺEp. Ring Mastersʺ, ʺEp. Dig Those Diglett!ʺ",
        image: "https://wiki.pokexgames.com/images/b/bf/3577%2C_5034%2C_9.png ",
        obs: "<center><b>(3577, 5034, 9)</b></center>"
    },
    {  
        label: " ʺEp. The Screen Actorˈs Guiltʺ, ʺEp. Wired for Battleʺ",
        image: " https://wiki.pokexgames.com/images/e/e9/3567%2C_5036%2C_9.png",
        obs: "<center><b>(3567, 5036, 9)</b></center>"
    },
    {
        label: " ʺEp. Stage Fightʺ, ʺEp. Who gets to keep Togepi?ʺ",
        image: "https://wiki.pokexgames.com/images/e/eb/3569%2C_5036%2C_9.png",
        obs: "<center><b>(3569, 5036, 9)</b></center>"
    },
    {
        label: " ʺEp. Pikachu Re-Voltsʺ, ʺEp. Imitation Confrontationʺ",
        image: " https://wiki.pokexgames.com/images/c/c2/3571%2C_5036%2C_9.png",
        obs: "<center><b>(3571, 5036, 9)</b></center>"
    },
    {  
        label: " ʺEp. Meowth Rules!ʺ, ʺEp. To Master the Onixpected!ʺ",
        image: " https://wiki.pokexgames.com/images/8/8e/3567%2C_5039%2C_9.png",
        obs: "<center><b>(3567, 5039, 9)</b></center>"
    },
    {
        label: " ʺEp. So Near, Yet So Farfetchˈdʺ, ʺEp. Once In A Blue Moonʺ",
        image: " https://wiki.pokexgames.com/images/9/97/3569%2C_5039%2C_9.png",
        obs: "<center><b>(3569, 5039, 9)</b></center>"
    },
    {
        label: " ʺEp. Bulbasaurˈs Mysterious Gardenʺ, ʺEp. Mountain Timeʺ",
        image: "https://wiki.pokexgames.com/images/6/62/3568%2C_5039%2C_9.png ",
        obs: "<center><b>(3568, 5039, 9)</b></center>"
    },
    {  
        label: " ʺEp. The Battle of the Badgeʺ, ʺEp. Hypnoˈs Naptimeʺ",
        image: "https://wiki.pokexgames.com/images/6/60/3538%2C_5020%2C_10.png",
        obs: "<center><b>(3538, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. The Fire-ring Squadʺ, ʺEp. Bound For Troubleʺ",
        image: "https://wiki.pokexgames.com/images/3/3a/3540%2C_5020%2C_10.png",
        obs: "<center><b>(3540, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. Friends to the Endʺ, ʺEp. Bulbasaur and the Hidden Villageʺ",
        image: "https://wiki.pokexgames.com/images/e/ee/3542%2C_5020%2C_10.png",
        obs: "<center><b>(3542, 5020, 10)</b></center>"
    },
    {  
        label: " ʺEp. UnBEARableʺ, ʺEp. Primeape Goes Bananasʺ",
        image: " https://wiki.pokexgames.com/images/1/19/3547%2C_5020%2C_10.png",
        obs: "<center><b>(3547, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. Hello Pummeloʺ, ʺEp. A Corsola Caper!ʺ",
        image: "https://wiki.pokexgames.com/images/f/ff/3549%2C_5020%2C_10.png",
        obs: "<center><b>(3549, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. Viva Las Laprasʺ, ʺEp. A Farfetchˈd Taleʺ",
        image: "https://wiki.pokexgames.com/images/6/6d/3551%2C_5020%2C_10.png",
        obs: "<center><b>(3551, 5020, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Purr-fect Heroʺ, ʺEp. Flower Powerʺ",
        image: "https://wiki.pokexgames.com/images/a/a4/3538%2C_5023%2C_10.png ",
        obs: "<center><b>(3538, 5023, 10)</b></center>"
    },
    {
        label: " ʺEp. Itˈs Mr. Mime Timeʺ, ʺEp. The Ancient Puzzle of Pokémopolisʺ",
        image: "https://wiki.pokexgames.com/images/a/a2/3540%2C_5023%2C_10.png",
        obs: "<center><b>(3540, 5023, 10)</b></center>"
    },
    {
        label: " ʺEp. Haunter versus Kadabraʺ, ʺEp. The Superhero Secretʺ",
        image: "https://wiki.pokexgames.com/images/2/28/3542%2C_5023%2C_10.png",
        obs: "<center><b>(3542, 5023, 10)</b></center>"
    },
    {  
        label: " ʺEp. Goinˈ Apricornʺ, ʺEp. The Psychic Sidekicksʺ",
        image: " https://wiki.pokexgames.com/images/3/31/3547%2C_5023%2C_10.png",
        obs: "<center><b>(3547, 5023, 10)</b></center>"
    },
    {
        label: " ʺEp. Riddle Me Thisʺ, ʺEp. The Wacky Watcherʺ",
        image: "https://wiki.pokexgames.com/images/b/b3/3546%2C_5023%2C_10.png ",
        obs: "<center><b>(3546, 5023, 10)</b></center>"
    },
    {
        label: " ʺEp. In The Pinkʺ, ʺEp. The Bug Stops Hereʺ",
        image: "https://wiki.pokexgames.com/images/e/e9/3550%2C_5023%2C_10.png ",
        obs: "<center><b>(3550, 5023, 10)</b></center>"
    },
    {  
        label: " ʺEp. Holiday Hi-Jynxʺ, ʺEp. Princess vs. Princessʺ",
        image: "https://wiki.pokexgames.com/images/f/f6/3537%2C_5026%2C_10.png",
        obs: "<center><b>(3537, 5026, 10)</b></center>"
    },
    {
        label: " ʺEp. The Light Fantasticʺ, ʺEp. Friend and Foe Alikeʺ",
        image: "https://wiki.pokexgames.com/images/4/49/3538%2C_5026%2C_10.png",
        obs: "<center><b>(3538, 5026, 10)</b></center>"
    },
    {
        label: " ʺEp. Good ˈQuil Huntingʺ, ʺEp. A Better Pill to Swallowʺ",
        image: "https://wiki.pokexgames.com/images/2/2e/3541%2C_5026%2C_10.png",
        obs: "<center><b>(3541, 5026, 10)</b></center>"
    },
    {  
        label: " ʺEp. A Dairy Tale Endingʺ, ʺEp. The Grass Routeʺ",
        image: "https://wiki.pokexgames.com/images/a/a3/3540%2C_5029%2C_10.png",
        obs: "<center><b>(3540, 5029, 10)</b></center>"
    },
    {
        label: " ʺEp. Moving Picturesʺ, ʺEp. Dueling Heroesʺ",
        image: "https://wiki.pokexgames.com/images/5/56/3542%2C_5029%2C_10.png ",
        obs: "<center><b>(3542, 5029, 10)</b></center>"
    },
    {  
        label: " ʺEp. A Shadow of a Droughtʺ, ʺEp. No Big Woopʺ",
        image: " https://wiki.pokexgames.com/images/6/68/3539%2C_5032%2C_10.png",
        obs: "<center><b>(3539, 5032, 10)</b></center>"
    },
    {
        label: " ʺEp. Troubleˈs Brewingʺ, ʺEp. Pokémon Emergency!ʺ",
        image: "https://wiki.pokexgames.com/images/5/51/3542%2C_5032%2C_10.png ",
        obs: "<center><b>(3542, 5032, 10)</b></center>"
    },
    {  
        label: " ʺEp. Grin to Win!ʺ, ʺEp. Wobbu-Palooza!ʺ",
        image: " https://wiki.pokexgames.com/images/6/69/3538%2C_5036%2C_10.png",
        obs: "<center><b>(3538, 5036, 10)</b></center>"
    },
    {
        label: " ʺEp. Wings ˈNˈ Thingsʺ, ʺEp. Navel Maneuversʺ",
        image: " https://wiki.pokexgames.com/images/2/2b/3540%2C_5036%2C_10.png",
        obs: "<center><b>(3540, 5036, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Problem with Parasʺ, ʺEp. Pokémon Double Troubleʺ",
        image: "https://wiki.pokexgames.com/images/e/e8/3547%2C_5036%2C_10.png",
        obs: "<center><b>(3547, 5036, 10)</b></center>"
    },
    {
        label: " ʺEp. Sparks Fly for Magnemiteʺ, ʺEp. Roll On, Pokémon!ʺ",
        image: "https://wiki.pokexgames.com/images/2/28/3549%2C_5036%2C_10.png",
        obs: "<center><b>(3549, 5036, 10)</b></center>"
    },
    {
        label: " ʺEp. Control Freak!ʺ, ʺEp. The Song of Jigglypuffʺ",
        image: "https://wiki.pokexgames.com/images/e/e4/3551%2C_5036%2C_10.png",
        obs: "<center><b>(3551, 5036, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Perfect Match!ʺ, ʺEp. A Shipful of Shiversʺ",
        image: "https://wiki.pokexgames.com/images/4/4c/3538%2C_5039%2C_10.png",
        obs: "<center><b>(3538, 5039, 10)</b></center>"
    },
    {
        label: " ʺEp. Power Play!ʺ, ʺEp. A Scare in the Airʺ",
        image: "https://wiki.pokexgames.com/images/c/c1/3540%2C_5039%2C_10.png",
        obs: "<center><b>(3540, 5039, 10)</b></center>"
    },
    {
        label: " ʺEp. Showdown at Dark Cityʺ, ʺEp. Wherefore Art Thou, Pokémon?ʺ",
        image: "https://wiki.pokexgames.com/images/d/db/3539%2C_5039%2C_10.png",
        obs: "<center><b>(3539, 5039, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Totodile Duelʺ, ʺEp. The Big Balloon Blow-Upʺ",
        image: "https://wiki.pokexgames.com/images/6/68/3547%2C_5039%2C_10.png",
        obs: "<center><b>(3547, 5039, 10)</b></center>"
    },
    {
        label: " ʺEp. Beach Blank-Out Blastoiseʺ, ʺEp. The Ultimate Testʺ",
        image: "https://wiki.pokexgames.com/images/d/d4/3549%2C_5039%2C_10.png",
        obs: "<center><b>(3549, 5039, 10)</b></center>"
    },
    {  
        label: " ʺEp. Bye Bye Butterfreeʺ, ʺEp. Machoke, Machoke Man!ʺ",
        image: "https://wiki.pokexgames.com/images/5/59/3538%2C_5042%2C_10.png",
        obs: "<center><b>(3538, 5042, 10)</b></center>"
    },
    {
        label: " ʺEp. Charizardˈs Burning Ambitionsʺ, ʺEp. Love, Totodile Styleʺ",
        image: "https://wiki.pokexgames.com/images/e/e4/3540%2C_5042%2C_10.png",
        obs: "<center><b>(3540, 5042, 10)</b></center>"
    },
    {
        label: " ʺEp. Around the Whirlpoolʺ, ʺEp. The Battling Eevee Brothersʺ",
        image: "https://wiki.pokexgames.com/images/4/43/3558%2C_5020%2C_10.png",
        obs: "<center><b>(3558, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. All That Glitters!ʺ, ʺEp. The Lost Laprasʺ",
        image: " https://wiki.pokexgames.com/images/3/30/3559%2C_5020%2C_10.png",
        obs: "<center><b>(3559, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. Charizard Chillsʺ, ʺEp. The Tower of Terrorʺ",
        image: "https://wiki.pokexgames.com/images/5/58/3561%2C_5020%2C_10.png ",
        obs: "<center><b>(3561, 5020, 10)</b></center>"
    },
    {  
        label: " ʺEp. Sick Dazeʺ, ʺEp. A Promise is a Promiseʺ",
        image: " https://wiki.pokexgames.com/images/e/e9/3567%2C_5020%2C_10.png",
        obs: "<center><b>(3567, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. The Evolution Solutionʺ, ʺEp. Hassle in the Castleʺ",
        image: "https://wiki.pokexgames.com/images/5/57/3569%2C_5020%2C_10.png",
        obs: "<center><b>(3569, 5020, 10)</b></center>"
    },
    {
        label: " ʺEp. The Bridge Bike Gangʺ, ʺEp. Air Timeʺ",
        image: "https://wiki.pokexgames.com/images/2/24/3571%2C_5020%2C_10.png ",
        obs: "<center><b>(3571, 5020, 10)</b></center>"
    },
    {  
        label: " ʺEp. All Fired Up!ʺ, ʺEp. Houndoomˈs Special Deliveryʺ",
        image: "https://wiki.pokexgames.com/images/2/26/3559%2C_5023%2C_10.png ",
        obs: "<center><b>(3559, 5023, 10)</b></center>"
    },
    {
        label: " ʺEp. A Friend In Deedʺ, ʺEp. Snubbull Snobberyʺ",
        image: " https://wiki.pokexgames.com/images/3/35/3562%2C_5023%2C_10.png",
        obs: "<center><b>(3562, 5023, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Wayward Wobbuffetʺ, ʺEp. Electric Soldier Porygonʺ",
        image: "https://wiki.pokexgames.com/images/d/d0/3567%2C_5023%2C_10.png ",
        obs: "<center><b>(3567, 5023, 10)</b></center>"
    },
    {
        label: " ʺEp. A Goldenrod Opportunityʺ, ʺEp. Turning Over A New Bayleefʺ",
        image: " https://wiki.pokexgames.com/images/b/b4/3569%2C_5023%2C_10.png",
        obs: "<center><b>(3569, 5023, 10)</b></center>"
    },
    {
        label: " ʺEp. The Case of of the K-9 Caper!ʺ, ʺEp. Clefairy Talesʺ",
        image: "https://wiki.pokexgames.com/images/8/8e/3571%2C_5023%2C_10.png ",
        obs: "<center><b>(3571, 5023, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Apple Corp!ʺ, ʺEp. Bad to the Boneʺ",
        image: "https://wiki.pokexgames.com/images/6/63/3569%2C_5026%2C_10.png",
        obs: "<center><b>(3569, 5026, 10)</b></center>"
    },
    {
        label: " ʺEp. Island of the Giant Pokémon!ʺ, ʺEp. The Punchy Pokémonʺ",
        image: "https://wiki.pokexgames.com/images/8/8a/3571%2C_5026%2C_10.png ",
        obs: "<center><b>(3571, 5026, 10)</b></center>"
    },
    {  
        label: " ʺEp. Hot Matches!ʺ, ʺEp. Fight For The Light!ʺ",
        image: "https://wiki.pokexgames.com/images/b/b0/3567%2C_5029%2C_10.png",
        obs: "<center><b>(3567, 5029, 10)</b></center>"
    },
    {
        label: " ʺEp. The Fourth Round Rumbleʺ, ʺEp. The Mystery is Historyʺ",
        image: "https://wiki.pokexgames.com/images/a/a0/3569%2C_5029%2C_10.png ",
        obs: "<center><b>(3569, 5029, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Little Big Hornʺ, ʺEp. The Pi-Kahunaʺ",
        image: "https://wiki.pokexgames.com/images/5/5a/3567%2C_5032%2C_10.png",
        obs: "<center><b>(3567, 5032, 10)</b></center>"
    },
    {
        label: " ʺEp. The Whistle Stopʺ, ʺEp. Shell Shockʺ",
        image: "https://wiki.pokexgames.com/images/f/f2/3569%2C_5032%2C_10.png",
        obs: "<center><b>(3569, 5032, 10)</b></center>"
    },
    {  
        label: " ʺEp. Holy Matrimony!ʺ, ʺEp. Showdown at the Po-ké Corralʺ",
        image: " https://wiki.pokexgames.com/images/e/eb/3558%2C_5036%2C_10.png",
        obs: "<center><b>(3558, 5036, 10)</b></center>"
    },
    {
        label: " ʺEp. Tanks A Lot!ʺ, ʺEp. Volcanic Panicʺ",
        image: "https://wiki.pokexgames.com/images/9/90/3560%2C_5036%2C_10.png ",
        obs: "<center><b>(3560, 5036, 10)</b></center>"
    },
    {
        label: " ʺEp. A Ghost of a Chanceʺ, ʺEp. Beauty and the Beachʺ",
        image: " https://wiki.pokexgames.com/images/9/9d/3562%2C_5036%2C_10.png",
        obs: "<center><b>(3562, 5036, 10)</b></center>"
    },
    {  
        label: " ʺEp. A Chansey Operationʺ, ʺEp. Attack of the Prehistoric Pokémonʺ",
        image: "https://wiki.pokexgames.com/images/8/87/3567%2C_5036%2C_10.png",
        obs: "<center><b>(3567, 5036, 10)</b></center>"
    },
    {
        label: " ʺEp. Fire and Iceʺ, ʺEp. Fowl Playʺ",
        image: "https://wiki.pokexgames.com/images/1/10/3569%2C_5036%2C_10.png",
        obs: "<center><b>(3569, 5036, 10)</b></center>"
    },
    {
        label: " ʺEp. From Ghost To Ghostʺ, ʺEp. Tricks of the Tradeʺ",
        image: "https://wiki.pokexgames.com/images/f/fd/3571%2C_5036%2C_10.png",
        obs: "<center><b>(3571, 5036, 10)</b></center>"
    },
    {  
        label: " ʺEp. Current Eventsʺ, ʺEp. The Kangaskhan Kidʺ",
        image: "https://wiki.pokexgames.com/images/1/16/3561%2C_5039%2C_10.png",
        obs: "<center><b>(3561, 5039, 10)</b></center>"
    },
    {  
        label: " ʺEp. The Fortune Huntersʺ, ʺEp. Poké Ball Perilʺ",
        image: "https://wiki.pokexgames.com/images/9/99/3568%2C_5039%2C_10.png",
        obs: "<center><b>(3568, 5039, 10)</b></center>"
    },
    {
        label: " ʺEp. The Chikorita Rescueʺ, ʺEp. Charmander: The Stray Pokémonʺ",
        image: " https://wiki.pokexgames.com/images/1/10/3570%2C_5039%2C_10.png",
        obs: "<center><b>(3570, 5039, 10)</b></center>"
    },
    {  
        label: " ʺEp. Takinˈ It On the Chinchouʺ, ʺEp. Donˈt Touch That ˈDileʺ",
        image: "https://wiki.pokexgames.com/images/9/9a/3551%2C_5036%2C_9.png",
        obs: "<center><b>(3551, 5036, 9)</b></center>"
     },
    {  
        label: " ʺEp. A Way Off Day Offʺ, ʺEp. The Misty Mermaidʺ",
        image: "https://wiki.pokexgames.com/images/c/c5/3547%2C_5036%2C_9.png",
        obs: "<center><b>(3547, 5036, 9)</b></center>"
    }
]
</script>

Edição atual tal como às 23h45min de 16 de outubro de 2024

<!DOCTYPE html> <html lang="pt-BR"> <head>

   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Busca de Imagens por Nome</title>
   <style>
       .input-group { margin-bottom: 1em; position: relative; }
       .dropdown {
           border: 1px solid #ccc;
           display: none;
           position: absolute;
           background-color: #fff;
           z-index: 1000;
           max-height: 150px;
           overflow-y: auto;
           width: 100%;
       }
       .dropdown-item {
           padding: 8px;
           cursor: pointer;
           display: flex;
           align-items: center;
       }
       .dropdown-item img {
           margin-right: 10px;
       }
       .dropdown-item:hover {
           background-color: #f0f0f0;
       }
       .image-container {
           display: flex;
           flex-direction: column;
           align-items: center;
           justify-content: center;
       }
       .image-item { 
           margin-bottom: 1em; 
           text-align: center;
       }
       .image-item img {
           display: block;
           margin: 0 auto;
       }
       .variations-container {
           display: flex;
           flex-wrap: wrap;
           justify-content: center;
           margin-top: 1em;
       }
       .variation-item {
           width: 35%;
           box-sizing: border-box;
           margin: 5px;
           text-align: center;
           border: 1px solid ;
           padding: 10px;
       }
       .variation-item img {
           display: block;
           margin: 0 auto 10px;
       }
       .swap-button { 
           margin-top: 10px;
           cursor: pointer;
           width: 15px;
           height: 15px;
           background: url('https://wiki.pokexgames.com/images/f/fb/SwapButtonAddons.png') no-repeat center;
           background-size: contain;
           display: block;
           margin: 0 auto;
       }
   </style>

</head> <body>

   <form id="imageForm">
           <input type="text" id="imageSearch" placeholder="Digite o nome da imagem" autocomplete="off">
   </form>
   <script>
       const imageList = {
           'Squirtle': { 
               imageUrl: 'https://wiki.pokexgames.com/images/7/7a/007-Squirtle.png', 
               variations: [
                   { 
                       description: 'Squirtle Purple Ninja Pack',
                       descriptionIMG: 'https://wiki.pokexgames.com/images/c/c1/Purple_Stripe.png',
                       obtain: {
                           url: 'https://wiki.pokexgames.com/index.php/Craft_Profissões_-_Estilista#Rank_E',
                           text: 'Estilista'
                       },
                       additionalImages: [
                           { url: 'https://wiki.pokexgames.com/images/d/dd/Squirtle_Purple_Ninja_Pack_Frente.png'}, // Frente
                           { url: 'https://wiki.pokexgames.com/images/5/50/Squirtle_Purple_Ninja_Pack_Esquerda.png'}, // Lado Esquerdo
                           { url: 'https://wiki.pokexgames.com/images/a/af/Squirtle_Purple_Ninja_Pack_Direita.png'}, // Costas
                           { url: 'https://wiki.pokexgames.com/images/5/5d/Squirtle_Purple_Ninja_Pack_Costas.png'}  // Lado Direito
                       ]
                   },
                   {  
                       description: 'Squirtle Red Ninja Pack',
                       descriptionIMG: 'https://wiki.pokexgames.com/images/c/c1/Purple_Stripe.png',
                       obtain: {
                           url: 'https://wiki.pokexgames.com/index.php/Craft_Profissões_-_Estilista#Rank_E',
                           text: 'Estilista'
                       },
                       additionalImages: [
                           { url: 'https://wiki.pokexgames.com/images/1/13/Squirtle_Red_Ninja_Pack_Frente.png'}, // Frente
                           { url: 'https://wiki.pokexgames.com/images/1/1e/Squirtle_Red_Ninja_Pack_Esquerda.png'}, // Lado Esquerdo
                           { url: 'https://wiki.pokexgames.com/images/0/01/Squirtle_Red_Ninja_Pack_Costas.png'}, // Costas
                           { url: 'https://wiki.pokexgames.com/images/f/fd/Squirtle_Red_Ninja_Pack_Direita.png'}  // Lado Direito
                       ]
                   }
               ]
           },
       };
       const imageSearch = document.getElementById('imageSearch');
       const dropdown = document.getElementById('dropdown');
       const imageContainer = document.getElementById('imageContainer');
       imageSearch.addEventListener('input', function() {
           const searchValue = this.value.trim().toLowerCase();
           dropdown.innerHTML = ;
           if (searchValue) {
               Object.keys(imageList).forEach(imageName => {
                   if (imageName.toLowerCase().includes(searchValue)) {
                       const dropdownItem = document.createElement('div');
                       dropdownItem.classList.add('dropdown-item');
                       
                       const imgElement = document.createElement('img');
                       imgElement.src = imageList[imageName].imageUrl;
                       imgElement.alt = imageName;
                       
                       dropdownItem.appendChild(imgElement);
                       dropdownItem.appendChild(document.createTextNode(imageName));
                       
                       dropdownItem.addEventListener('click', function() {
                           showImageInfo(imageName);
                           dropdown.style.display = 'none';
                       });
                       dropdown.appendChild(dropdownItem);
                   }
               });
               dropdown.style.display = dropdown.childNodes.length ? 'block' : 'none';
           } else {
               dropdown.style.display = 'none';
           }
       });
       document.addEventListener('click', function(event) {
           if (!imageSearch.contains(event.target) && !dropdown.contains(event.target)) {
               dropdown.style.display = 'none';
           }
       });

function showImageInfo(imageName) {

   const imageInfo = imageList[imageName];
   let imagesHtml = `
           <img src="${imageInfo.imageUrl}" alt="${imageName}">
   `;
   imageInfo.variations.forEach((variation, index) => {
       imagesHtml += `
                <img src="${variation.additionalImages[0].url}" alt="Variation Image" class="variation-image" data-variation-index="${index}" style="width: ${variation.additionalImages[0].width}px;">

                   <img src="${variation.descriptionIMG}" alt="Description Image" style="margin-right: 5px; display: inline-block;"> 
                   
${variation.description}
Como Obter: <a href="${variation.obtain.url}" target="_blank">${variation.obtain.text}</a>
       `;
   });
imagesHtml += '

';

   imageContainer.innerHTML = imagesHtml;
   imageContainer.classList.remove('hidden');
   // Alternar imagens ao clicar no botão de troca
   const swapButtons = document.querySelectorAll('.swap-button');
   swapButtons.forEach(button => {
       const index = button.getAttribute('data-variation-index');
       const variation = imageInfo.variations[index];
       let currentImageIndex = 0;
       button.addEventListener('click', () => {
           currentImageIndex = (currentImageIndex + 1) % variation.additionalImages.length;
           const variationImage = button.previousElementSibling; // Atualiza a imagem da variação
           variationImage.src = variation.additionalImages[currentImageIndex].url;
           variationImage.style.width = `${variation.additionalImages[currentImageIndex].width}px`;
       });
   });

}

   </script>

</body> </html>