PageSourceSearch

https://orloj.eu/cs/coolmenu_preklad1.js

js orloj.eu collected 2026-10-02 11:13:47 UTC 1,029 bytes, 30 lines download raw bytes

1// coolmenu_preklad1.js
2// --------------------
3// Vlajeèky › zmìna jazyka pøes Google Translate
4
5document.addEventListener("DOMContentLoaded", function () {
6    // Žádný pøeklad, pokud Google widget není naèten
7    if (!window.google || !google.translate) {
8        console.log("Translate engine not loaded yet.");
9    }
10
11    let icons = document.querySelectorAll("#lang-switcher img");
12    icons.forEach(img => {
13        img.addEventListener("click", function () {
14            let lang = img.getAttribute("data-lang");
15
16            // Loader
17            let loader = document.getElementById("translator-loader");
18            loader.style.display = "block";
19
20            // Google pøepínaè (pokud existuje)
21            let combo = document.querySelector(".goog-te-combo");
22            if (combo) {
23                combo.value = lang;
24                combo.dispatchEvent(new Event("change"));
25            }
26
27            setTimeout(() => loader.style.display = "none", 1500);
28        });
29    });
30});

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.