MCPcopy Create free account
hub / github.com/BrainicHQ/DoHSpeedTest / countryBadgeHTML

Function countryBadgeHTML

script.js:119–125  ·  view source on GitHub ↗
(server, extraClasses = '')

Source from the content-addressed store, hash-verified

117}
118
119function countryBadgeHTML(server, extraClasses = '') {
120 const label = countryLabel(server);
121 const flag = countryFlag(server && server.countryCode);
122 if (!label || !flag) return '';
123 const cls = `country-flag inline-flex shrink-0 items-center justify-center text-base leading-none ${extraClasses}`.trim();
124 return `<span class="${escapeHTML(cls)}" role="img" aria-label="${escapeHTML(label)}" title="${escapeHTML(label)}">${flag}</span>`;
125}
126
127function createCountryBadgeElement(server) {
128 const label = countryLabel(server);

Callers 2

updateResultFunction · 0.85
showTopResultsFunction · 0.85

Calls 3

countryLabelFunction · 0.85
countryFlagFunction · 0.85
escapeHTMLFunction · 0.85

Tested by

no test coverage detected