(function () { "use strict"; var root = document.documentElement; var lang = null; var theme = null; try { lang = localStorage.getItem("cursorlang.lang"); theme = localStorage.getItem("cursorlang.theme"); } catch (error) { // Storage refused: what the markup says stands } if (!lang && (navigator.language || "").toLowerCase().indexOf("ru") === 0) { lang = "ru"; } if (lang === "ru" || lang === "en") { root.setAttribute("data-lang", lang); root.setAttribute("lang", lang); } if (theme === "dark" || theme === "light") { root.setAttribute("data-theme", theme); } }());