aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils/setCookie.js
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-03-09 19:16:36 +0100
committerstonedDiscord <Tukz@gmx.de>2022-03-09 19:16:36 +0100
commite375a416503b07aa89151e17241ca3606aec0b2b (patch)
tree046a274702cbdca71379959d1e245f2310d3b92e /webAO/utils/setCookie.js
parent38a05ca3bb8ab972327c938a7a58d4aa07572daf (diff)
parent679bc9be8b0459d298ac1ac3f3b7e61278c184d9 (diff)
Merge branch 'master' of https://github.com/AttorneyOnline/webAO
Diffstat (limited to 'webAO/utils/setCookie.js')
-rw-r--r--webAO/utils/setCookie.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/webAO/utils/setCookie.js b/webAO/utils/setCookie.js
new file mode 100644
index 0000000..9734eae
--- /dev/null
+++ b/webAO/utils/setCookie.js
@@ -0,0 +1,10 @@
+/**
+ * set a cookie
+ * the version from w3schools expects these to expire
+ * @param {String} cname The name of the cookie to return
+ * @param {String} value The value of that cookie option
+ */
+const setCookie = (cname, value) => {
+ document.cookie = `${cname}=${value}`;
+};
+export default setCookie;