PageSourceSearch

https://forgames.cz/wp-content/plugins/abf-custom-blocks/src/js/i18n-runtime.js?ver=1790409615

js forgames.cz collected 2026-10-08 23:36:23 UTC 1,389 bytes, 41 lines download raw bytes

1(function () {
2  function get(key) {
3    const lang = (window.abfLang && abfLang.lang) || 'cs';
4    const dict = (window.abfLang && abfLang.dict) || {};
5    const pack = dict[key];
6    if (!pack) return key;
7    return pack[lang] || pack.cs || key;
8  }
9
10  function applyI18n(root) {
11    // textContent
12    root.querySelectorAll('[data-i18n]').forEach(el => {
13      const key = el.getAttribute('data-i18n');
14      el.textContent = get(key);
15    });
16    // placeholdery (inputy)
17    root.querySelectorAll('[data-i18n-placeholder]').forEach(el => {
18      const key = el.getAttribute('data-i18n-placeholder');
19      if ('placeholder' in el) el.placeholder = get(key);
20    });
21    // value tlačítek
22    root.querySelectorAll('[data-i18n-value]').forEach(el => {
23      const key = el.getAttribute('data-i18n-value');
24      if ('value' in el) el.value = get(key);
25    });
26    // data-wait atributy (formuláře)
27    root.querySelectorAll('[data-i18n-wait]').forEach(el => {
28      const key = el.getAttribute('data-i18n-wait');
29      el.setAttribute('data-wait', get(key));
30    });
31    // data-done atributy (formuláře)
32    root.querySelectorAll('[data-i18n-done]').forEach(el => {
33      const key = el.getAttribute('data-i18n-done');
34      el.setAttribute('data-done', get(key));
35    });
36  }
37
38  document.addEventListener('DOMContentLoaded', function () {
39    applyI18n(document);
40  });
41})();

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.