We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ae5cb7 commit 7f6ffa4Copy full SHA for 7f6ffa4
view/base/templates/js/getCookies.phtml view/base/templates/js/getCookie.phtmlview/base/templates/js/getCookies.phtml renamed to view/base/templates/js/getCookie.phtml
@@ -11,19 +11,19 @@
11
?>
12
<script data-mfmofile="true">
13
window.MagefanJs = window.MagefanJs || {};
14
- window.MagefanJs.getCookies = function(options) {
15
- let name = options + "=";
+ window.MagefanJs.getCookie = function(cookieName) {
+ let name = cookieName + '=';
16
let decodedCookie = decodeURIComponent(document.cookie);
17
let ca = decodedCookie.split(';');
18
for(let i = 0; i <ca.length; i++) {
19
let c = ca[i];
20
- while (c.charAt(0) == ' ') {
+ while (c.charAt(0) === ' ') {
21
c = c.substring(1);
22
}
23
- if (c.indexOf(name) == 0) {
+ if (c.indexOf(name) === 0) {
24
return c.substring(name.length, c.length);
25
26
27
- return "";
+ return '';
28
29
</script>
0 commit comments