${providerLabel}
${displayProvider}
Cache
${cacheStatus}
`;
// Add POP location if available and not N/A
if (info.pop && info.pop !== 'N/A') {
let displayPop = info.pop;
if (displayPop.length > 18) {
displayPop = displayPop.substring(0, 15) + '...';
}
panelContent += `
POP
${displayPop}
`;
}
// Trigger generic DNS check for current domain
checkDNS(window.location.hostname).then(dnsResult => {
updatePanelWithDNS(dnsResult, info);
});
// Auto-hide logic (if enabled)
// Removed as per request to keep it minimal
panelContent += `
`; // Close info-lines-container
panel.innerHTML = panelContent;
shadowRoot.appendChild(panel);
shadowRoot.querySelector('.close-btn').addEventListener('click', (e) => {
e.stopPropagation();
host.remove();
});
shadowRoot.querySelector('.theme-btn').addEventListener('click', (e) => {
e.stopPropagation();
// Toggle between light and dark only
config.settings.theme = config.settings.theme === 'light' ? 'dark' : 'light';
// Save settings
if (typeof GM_setValue !== 'undefined') {
GM_setValue('cdnInfoSettings', JSON.stringify(config.settings));
}
// Update icon immediately with SVG
const sunIcon = `