// My badge, trophy, and reputation points status on Microsoft Learn const status = '138 Badges, 22 Trophies, 120 Reputation points'; // Microsoft Learn main Profile URL const profileLink = 'https://learn.microsoft.com/en-us/users/ironcore/'; // Select all card elements that contain the achievements const cards = document.querySelectorAll('.card'); // Initialize an array to store the titles and certificate URLs const achievements = []; // Loop through each card and extract the title and certificate URL cards.forEach(card => { const titleElement = card.querySelector('.card-content-title h3'); const certElement = card.querySelector('a[data-bi-name="achievement-print"]'); if (titleElement && certElement) { achievements.push({ title: titleElement.textContent.trim(), certUrl: certElement.href }); } }); // Sort the achievements alphabetically by title achievements.sort((a, b) => a.title.localeCompare(b.title)); // Log the status and profile link console.log(`Status: ${status}`); console.log(`Profile: ${profileLink}`); // Log the titles and certificate URLs in a structured order with numbers achievements.forEach((achievement, index) => { console.log(`${index + 1}. ${achievement.title} - Certificate: ${achievement.certUrl}`); });