Spaces:
Runtime error
Runtime error
neon_arch
commited on
Commit
•
1654f74
1
Parent(s):
a727d38
✨ feat: fix code formatting (#210)
Browse files- public/static/cookies.js +4 -3
public/static/cookies.js
CHANGED
@@ -16,8 +16,9 @@ document.addEventListener(
|
|
16 |
let cookie = decodeURIComponent(document.cookie)
|
17 |
// Set the value of the input field to the decoded cookie value if it is not empty
|
18 |
// Otherwise, display a message indicating that no cookies have been saved on the user's system
|
19 |
-
document.querySelector('.cookies input').value =
|
20 |
-
|
|
|
21 |
} catch (error) {
|
22 |
// If there is an error decoding the cookie, log the error to the console
|
23 |
// and display an error message in the input field
|
@@ -25,5 +26,5 @@ document.addEventListener(
|
|
25 |
document.querySelector('.cookies input').value = 'Error decoding cookie'
|
26 |
}
|
27 |
},
|
28 |
-
false
|
29 |
)
|
|
|
16 |
let cookie = decodeURIComponent(document.cookie)
|
17 |
// Set the value of the input field to the decoded cookie value if it is not empty
|
18 |
// Otherwise, display a message indicating that no cookies have been saved on the user's system
|
19 |
+
document.querySelector('.cookies input').value = cookie.length
|
20 |
+
? cookie
|
21 |
+
: 'No cookies have been saved on your system'
|
22 |
} catch (error) {
|
23 |
// If there is an error decoding the cookie, log the error to the console
|
24 |
// and display an error message in the input field
|
|
|
26 |
document.querySelector('.cookies input').value = 'Error decoding cookie'
|
27 |
}
|
28 |
},
|
29 |
+
false,
|
30 |
)
|