mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-13 03:23:18 +03:00
19 lines
343 B
PHP
19 lines
343 B
PHP
<?php
|
|
/**
|
|
* @var string $attributes
|
|
*/
|
|
?>
|
|
<script <?= $attributes ?>>
|
|
window.vars = (function () {
|
|
const vars = <?= json_encode(script_vars()) ?>;
|
|
|
|
return (key) => {
|
|
if (!key) {
|
|
return vars;
|
|
}
|
|
|
|
return vars[key] || undefined;
|
|
};
|
|
})();
|
|
</script>
|
|
|