| Server IP : 213.186.33.4 / Your IP : 216.73.216.146 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www2/wp-content/plugins/jetpack/modules/widgets/eu-cookie-law/ |
Upload File : |
( function( $ ) {
var cookieValue = document.cookie.replace( /(?:(?:^|.*;\s*)eucookielaw\s*\=\s*([^;]*).*$)|^.*$/, '$1' ),
overlay = $( '#eu-cookie-law' ),
initialScrollPosition,
scrollFunction;
if ( overlay.hasClass( 'top' ) ) {
$( '.widget_eu_cookie_law_widget' ).addClass( 'top' );
}
if ( overlay.hasClass( 'ads-active' ) ) {
var adsCookieValue = document.cookie.replace( /(?:(?:^|.*;\s*)personalized-ads-consent\s*\=\s*([^;]*).*$)|^.*$/, '$1' );
if ( '' !== cookieValue && '' !== adsCookieValue ) {
overlay.remove();
}
} else if ( '' !== cookieValue ) {
overlay.remove();
}
$( '.widget_eu_cookie_law_widget' ).appendTo( 'body' ).fadeIn();
overlay.find( 'form' ).on( 'submit', accept );
if ( overlay.hasClass( 'hide-on-scroll' ) ) {
initialScrollPosition = $( window ).scrollTop();
scrollFunction = function() {
if ( Math.abs( $( window ).scrollTop() - initialScrollPosition ) > 50 ) {
accept();
}
};
$( window ).on( 'scroll', scrollFunction );
} else if ( overlay.hasClass( 'hide-on-time' ) ) {
setTimeout( accept, overlay.data( 'hide-timeout' ) * 1000 );
}
var accepted = false;
function accept( event ) {
if ( accepted ) {
return;
}
accepted = true;
if ( event && event.preventDefault ) {
event.preventDefault();
}
if ( overlay.hasClass( 'hide-on-scroll' ) ) {
$( window ).off( 'scroll', scrollFunction );
}
var expireTime = new Date();
expireTime.setTime( expireTime.getTime() + ( overlay.data( 'consent-expiration' ) * 24 * 60 * 60 * 1000 ) );
document.cookie = 'eucookielaw=' + expireTime.getTime() + ';path=/;expires=' + expireTime.toGMTString();
if ( overlay.hasClass( 'ads-active' ) && overlay.hasClass( 'hide-on-button' ) ) {
document.cookie = 'personalized-ads-consent=' + expireTime.getTime() + ';path=/;expires=' + expireTime.toGMTString();
}
overlay.fadeOut( 400, function() {
overlay.remove();
} );
}
} )( jQuery );