+function DrawContacts(contacts) {
+ if (!contacts) return;
+ var contact_list = '<hr><h4 class="pure-u1">Контакты</h4>'
+ for (const contact of contacts) {
+ const url = new URL(contact)
+ var ref
+ console.log(url)
+ switch (url.protocol) {
+ case 'http':
+ case 'https:':
+ ref = '⌂ '+url.hostname
+ break
+ case 'mailto:':
+ ref = '✉ '+url.pathname
+ break
+ default:
+ ref = '🖅 '+url.pathname
+ }
+ contact_list += '<a href="'+contact+'">'+ref+'</a>'
+ }
+ var footer = document.getElementById('_ui_contacts');
+ footer.innerHTML = contact_list
+}
+