File tree 1 file changed +15
-2
lines changed 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 41
41
return ! ! ( navigator . cookieEnabled ) ;
42
42
} ;
43
43
44
+ var inArrayCookiesEnabled = function ( cookieName , cookiesEnabled ) {
45
+ var index = - 1 ;
46
+
47
+ for ( var i = 0 ; i < cookiesEnabled . length ; i ++ ) {
48
+ if ( cookieName . toLowerCase ( ) === cookiesEnabled [ i ] . toLowerCase ( ) ) {
49
+ index = i ;
50
+ break ;
51
+ }
52
+ }
53
+
54
+ return index ;
55
+ } ;
56
+
44
57
var setCookie = function ( that , cookieName , cookieValue ) {
45
58
if ( ( ! that . options . cookie ) || ( ! cookieEnabled ( ) ) || ( that . options . cookieIdTable === '' ) ) {
46
59
return ;
47
60
}
48
61
49
- if ( $ . inArray ( cookieName . toLowerCase ( ) , that . options . cookiesEnabled ) === - 1 ) {
62
+ if ( inArrayCookiesEnabled ( cookieName , that . options . cookiesEnabled ) === - 1 ) {
50
63
return ;
51
64
}
52
65
64
77
return null ;
65
78
}
66
79
67
- if ( $ . inArray ( cookieName . toLowerCase ( ) , that . options . cookiesEnabled ) === - 1 ) {
80
+ if ( inArrayCookiesEnabled ( cookieName , that . options . cookiesEnabled ) === - 1 ) {
68
81
return null ;
69
82
}
70
83
You can’t perform that action at this time.
0 commit comments