1function _t(message, replacements = {}) { 2 let translation = typeof wiki !== 'undefined' 3 && wiki.lang !== undefined 4 ? (wiki.lang[message] ?? null) : null 5 if (!translation) { 6 translation = message 7 if (typeof wiki !== 'undefined' && wiki.isDebugEnabled) { 8 console.warn(`Translation was not found in wiki.lang for "${message}", (wiki.locale = ${wiki.locale})`) 9 } 10 } 11 for (const key in replacements) { 12 while (translation.includes(`{${key}}`)) { 13 translation = translation.replace(`{${key}}`, replacements[key]) 14 } 15 } 16 return translation 17} 18 19var wiki = { 20 ...((typeof wiki !== 'undefined') ? wiki : null), 21 ...{ 22 url(url, params = {}) { 23 let result = wiki.baseUrl + url 24 result = result.replace('??', '?') 25 stringParams = [] 26 for (const key in params) { 27 stringParams.push(`${key}=${encodeURIComponent(params[key])}`) 28 } 29 if (stringParams.length) { 30 result += result.includes('?') ? '&' : '?' 31 result += stringParams.join('&') 32 } 33 return result 34 }, 35 cssVar(varName) { 36 return getComputedStyle(document.documentElement).getPropertyValue(varName) 37 } 38 } 39}
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.