1 2(function () { 3 'use strict'; 4 5 window.DocAccess = window.DocAccess || {}; 6 7 const DEFAULT_LANGUAGES = ['en', 'es', 'zh-CN', 'vi', 'tl', 'ko', 'hy', 'fa']; 8 9 const PUBLIC_MEETINGS_TRANSLATIONS = { 10 'en': 'Public Meetings', 11 'es': 'Reuniones Públicas', 12 'zh-CN': 'å ¬å¼ä¼è®®', 13 'zh-TW': 'å ¬éæè°', 14 'vi': 'Cuá»c Há»p Công Cá»ng', 15 'tl': 'Mga Pampublikong Pulong', 16 'ko': 'ê³µê° íì', 17 'hy': 'Õdelays delays', 18 'fa': 'Ø¬ÙØ³Ø§Øª ع٠ÙÙ Û', 19 'ru': 'ÐÑблиÑнÑе ÑобÑаниÑ', 20 'ar': 'Ø§ÙØ§Ø¬ØªÙ اعات Ø§ÙØ¹Ø§Ù Ø©', 21 'ja': 'å ¬éä¼è°', 22 'pa': 'à¨à¨¨à¨¤à¨ ਮà©à¨à¨¿à©°à¨à¨¾à¨', 23 'hi': 'सारà¥à¤µà¤à¤¨à¤¿à¤ बà¥à¤ à¤à¥à¤', 24 'th': 'à¸à¸²à¸£à¸à¸£à¸°à¸à¸¸à¸¡à¸ªà¸²à¸à¸²à¸£à¸à¸°', 25 'km': 'áá·á áá ááááá»ááá¶áá¶ááá', 26 'hmn': 'Rooj Sib Tham Rau Pej Xeem', 27 'lo': 'àºàºàºàºàº°àºàº¸àº¡àºªàº²àºàº²àº¥àº°àºàº°', 28 'de': 'Ãffentliche Sitzungen', 29 'fr': 'Réunions Publiques', 30 'pt': 'Reuniões Públicas', 31 'my': 'á¡áá»á¬á¸áá¼ááºáá° á¡á ááºá¸á¡áá±á¸áá»á¬á¸', 32 'am': 'á¨ááᥠáµá¥á°á£áá½', 33 'uk': 'ÐÑблÑÑÐ½Ñ Ð·Ð°ÑÑданнÑ' 34 }; 35 36 window.DocAccess.SB707 = { 37 config: null, 38 blockInserted: false, 39 40 init: function (config) { 41 this.config = config; 42 43 if (!this.isHomepage()) { 44 console.log('DocAccess SB707: Not on homepage, skipping block'); 45 return; 46 } 47 48 if (!config || !config.enabled) { 49 console.log('DocAccess SB707: Not enabled, skipping block'); 50 return; 51 } 52 53 if (document.readyState === 'loading') { 54 document.addEventListener('DOMContentLoaded', () => this.insertBlock()); 55 } else { 56 this.insertBlock(); 57 } 58 }, 59 60 isHomepage: function () { 61 const path = window.location.pathname; 62 return path === '/' || path === '' || path === '/index.html' || path === '/index.php'; 63 }, 64 65 getCivicClerkUrl: function (lang) { 66 if (!this.config || !this.config.civicclerk_tenant) { 67 return null; 68 } 69 70 let url = `https://${this.config.civicclerk_tenant}.portal.civicclerk.com`; 71 72 if (lang && !lang.startsWith('en')) { 73 url += `?lang=${encodeURIComponent(lang)}`; 74 } 75 76 return url; 77 }, 78 79 getTranslation: function (langCode) { 80 return PUBLIC_MEETINGS_TRANSLATIONS[langCode] || PUBLIC_MEETINGS_TRANSLATIONS['en']; 81 }, 82 83 insertBlock: function () { 84 if (this.blockInserted) return; 85 86 const languages = this.config.languages || DEFAULT_LANGUAGES; 87 const tenant = this.config.civicclerk_tenant; 88 89 if (!tenant) { 90 console.warn('DocAccess SB707: No CivicClerk tenant configured'); 91 return; 92 } 93 94 const footer = document.querySelector('footer[data-cprole="structuralContainer"]') || 95 document.querySelector('footer#footerContainerTS') || 96 document.querySelector('footer') || 97 document.querySelector('[role="contentinfo"]') || 98 document.querySelector('#footer') || 99 document.querySelector('.footer'); 100 101 if (!footer) { 102 console.warn('DocAccess SB707: Could not find footer element'); 103 return; 104 } 105 106 const block = document.createElement('section'); 107 block.id = 'docaccess-sb707-block'; 108 block.setAttribute('role', 'region'); 109 block.setAttribute('aria-label', 'Public Meetings Links'); 110 111 const links = languages.map(langCode => { 112 const url = this.getCivicClerkUrl(langCode); 113 const text = this.getTranslation(langCode); 114 return `<a href="${url}" ${langCode !== 'en' ? `hreflang="${langCode}"` : ''}>${text}</a>`; 115 }).join(' · '); 116 117 block.innerHTML = ` 118 <style> 119 #docaccess-sb707-block { 120 background-color: #555; 121 padding: 20px; 122 text-align: center; 123 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; 124 } 125 126 #docaccess-sb707-block a { 127 color: white; 128 text-decoration: none; 129 font-size: 14px; 130 transition: opacity 0.2s ease; 131 } 132 133 #docaccess-sb707-block a:hover, 134 #docaccess-sb707-block a:focus { 135 text-decoration: underline; 136 opacity: 0.9; 137 } 138 </style> 139 ${links} 140 `; 141 142 footer.parentNode.insertBefore(block, footer.nextSibling); 143 144 this.blockInserted = true; 145 console.log('DocAccess SB707: Public Meetings block
145inserted after footer'); 146 } 147 }; 148 149 window.DocAccess.SB707Block = window.DocAccess.SB707; 150 151})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.