1NProgress.start(); 2 3function toggleTheme() { 4 const theme = document.body.getAttribute("data-bs-theme"); 5 const _theme = theme === "dark" ? "light" : "dark"; 6 document.body.setAttribute("data-bs-theme", _theme); 7 localStorage.setItem("theme", _theme); 8} 9 10document.addEventListener("DOMContentLoaded", () => { 11 const theme = document.body.getAttribute("data-bs-theme"); 12 const _theme = localStorage.getItem("theme"); 13 if (theme !== _theme) toggleTheme(); 14 NProgress.done(); 15 16 const select = document.getElementById("language-select"); 17 if (select) { 18 select.addEventListener("change", function () { 19 window.location.href = "/lang/" + select.value; 20 }); 21 } 22}); 23 24const toastLive = document.getElementById("toast"); 25const toastTriggers = document.getElementsByClassName("toast-btn"); 26 27if (toastTriggers.length > 0) { 28 const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLive); 29 Array.from(toastTriggers).forEach((trigger) => { 30 trigger.addEventListener("click", () => { 31 document.getElementById("toast-title").innerText = "Get the app"; 32 document.getElementById("toast-message").innerText = 33 "The mobile app will launch soon, stay tuned"; 34 toastBootstrap.show(); 35 }); 36 }); 37}
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.