/**
 * Highlight Links Bookmarklet
 *
 * Highlights all links on the current page with a yellow background
 * and displays a count of total links found.
 *
 * Usage: Click the bookmarklet on any webpage
 */

// Find all anchor tags
const links = document.querySelectorAll("a");

// Style each link
links.forEach((link) => {
  link.style.backgroundColor = "yellow";
  link.style.padding = "2px 4px";
  link.style.borderRadius = "3px";
});

// Show result
alert(
  `Highlighted ${links.length} link${links.length !== 1 ? "s" : ""} on this page!`,
);
