Skip to content

Commit 7f6ffa4

Browse files
authored
Update and rename getCookies.phtml to getCookie.phtml
1 parent 5ae5cb7 commit 7f6ffa4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
?>
1212
<script data-mfmofile="true">
1313
window.MagefanJs = window.MagefanJs || {};
14-
window.MagefanJs.getCookies = function(options) {
15-
let name = options + "=";
14+
window.MagefanJs.getCookie = function(cookieName) {
15+
let name = cookieName + '=';
1616
let decodedCookie = decodeURIComponent(document.cookie);
1717
let ca = decodedCookie.split(';');
1818
for(let i = 0; i <ca.length; i++) {
1919
let c = ca[i];
20-
while (c.charAt(0) == ' ') {
20+
while (c.charAt(0) === ' ') {
2121
c = c.substring(1);
2222
}
23-
if (c.indexOf(name) == 0) {
23+
if (c.indexOf(name) === 0) {
2424
return c.substring(name.length, c.length);
2525
}
2626
}
27-
return "";
27+
return '';
2828
}
2929
</script>

0 commit comments

Comments
 (0)