From 16cfbd19157df76e7296dddb287412f1099feb33 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Fri, 20 May 2022 13:37:43 -0600 Subject: Move static assets to within srv --- srv/src/http/static/utils.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 srv/src/http/static/utils.js (limited to 'srv/src/http/static/utils.js') diff --git a/srv/src/http/static/utils.js b/srv/src/http/static/utils.js new file mode 100644 index 0000000..96a2950 --- /dev/null +++ b/srv/src/http/static/utils.js @@ -0,0 +1,12 @@ +const cookies = {}; +const cookieKVs = document.cookie + .split(';') + .map(cookie => cookie.trim().split('=', 2)); + +for (const i in cookieKVs) { + cookies[cookieKVs[i][0]] = cookieKVs[i][1]; +} + +export { + cookies, +} -- cgit v1.2.3