memesearch
Coding a Better Button

Coding a Better Button

Download Find similar pictures
Text on the meme
async function fetchDetailArticle() { let info = new URL(window.location.href); const data = await getNewsInfoById(info.pathname.split('/')[3]); setData(data); } useEffect(() => { // Get the HTMLCollection that holds each picture currently const img tags = document .getElementsByClassName('article__content')[0] .getElementsByTagName('img'); // Loop over the collection elements for (const item of img tags) { imgArray.push(item.src); } // Create the button element let button = document.createElement('button'); button.classList.add('lightterButton'); button.onclick = () => { setarrnenty(item.src); setLightboxDisplay(true); }; // Insert button before img in article item.parentNode.insertBefore(button, item);
What it means

A dark screenshot shows handwritten-style source code in a web development editor. The code fetches article data, collects images, and creates a lightbox button. The joke is the exaggeratedly elaborate coding solution, making it useful as a reaction to messy, overcomplicated, or overly technical programming.

Objects
Tags
Sources
Type
image
Size
758×800 · 81.4 KiB
Mood
sarcastic
Language
en
Added

Similar memes