2022-01-18 12:43:40 +03:00
|
|
|
<script>
|
2022-01-18 10:18:22 +03:00
|
|
|
window.vars = (function () {
|
|
|
|
const vars = <?= json_encode(script_vars()) ?>;
|
|
|
|
|
|
|
|
return (key) => {
|
|
|
|
if (!key) {
|
|
|
|
return vars;
|
|
|
|
}
|
2023-11-29 12:24:09 +03:00
|
|
|
|
2022-01-18 10:18:22 +03:00
|
|
|
return vars[key] || undefined;
|
|
|
|
};
|
|
|
|
})();
|
2021-12-14 09:48:09 +03:00
|
|
|
</script>
|
|
|
|
|