aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils/setCookie.js
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-03-09 07:34:56 +0100
committerGitHub <noreply@github.com>2022-03-09 07:34:56 +0100
commit91c3769a78e59924a73db6c759844a9026e8da00 (patch)
tree64ce4ac3e786b31a935be40438d5dc831121f055 /webAO/utils/setCookie.js
parent63a282481d033640a87f97b74f31136410c93717 (diff)
parentcb6a2ddb36d27abd12a6d0b9aa493194d4c242a2 (diff)
Merge pull request #100 from caleb-mabry/webp-support
WebAO Partial Image Fixes
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;