File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,15 @@ $(document).ready(function() {
12
12
var matches = document . cookie . match ( new RegExp ( "(?:^|; )agree_to_use=([^;]*)" ) ) ;
13
13
var agreeToUseCookie = matches && decodeURIComponent ( matches [ 1 ] ) ;
14
14
if ( ! agreeToUseCookie ) {
15
- $ ( 'body' ) . append ( template ) ;
16
- $ ( '.agree-using-cookies' ) . on ( 'click' , function ( ) {
17
- var date = new Date ( ) ;
18
- date . setFullYear ( date . getFullYear ( ) + 2 ) ; // + 2 years
19
- document . cookie = 'agree_to_use=' + Date . now ( ) + '; path=/; expires=' + date . toUTCString ( ) ;
20
- $ ( '#cookie-notification' ) . hide ( ) ;
21
- return false ;
22
- } ) ;
15
+ setTimeout ( function ( ) {
16
+ $ ( 'body' ) . append ( template ) ;
17
+ $ ( '.agree-using-cookies' ) . on ( 'click' , function ( ) {
18
+ var date = new Date ( ) ;
19
+ date . setFullYear ( date . getFullYear ( ) + 2 ) ; // + 2 years
20
+ document . cookie = 'agree_to_use=' + Date . now ( ) + '; path=/; expires=' + date . toUTCString ( ) ;
21
+ $ ( '#cookie-notification' ) . hide ( ) ;
22
+ return false ;
23
+ } ) ;
24
+ } , 200 ) ;
23
25
}
24
26
} ) ;
You can’t perform that action at this time.
0 commit comments