PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | modules/widgets/eu-cookie-law/eu-cookie-law.js +9 -8 13.1.5 → 16.3 View file →
@@ -1,20 +1,21 @@
1 1 ( function () {
2 + var overlay = document.getElementById( 'eu-cookie-law' ),
3 + widget = document.querySelector( '.widget_eu_cookie_law_widget' );
4 +
5 + if ( null === widget || null === overlay ) {
6 + return;
7 + }
8 +
2 9 var cookieValue = document.cookie.replace(
3 - /(?:(?:^|.*;\s*)eucookielaw\s*\=\s*([^;]*).*$)|^.*$/,
10 + /(?:(?:^|.*;\s*)eucookielaw\s*=\s*([^;]*).*$)|^.*$/,
4 11 '$1'
5 12 ),
6 - overlay = document.getElementById( 'eu-cookie-law' ),
7 - widget = document.querySelector( '.widget_eu_cookie_law_widget' ),
8 13 inCustomizer = widget && widget.hasAttribute( 'data-customize-widget-id' ),
9 14 getScrollTop,
10 15 initialScrollPosition,
11 16 scrollFunction;
12 17
13 - if ( null === widget || null === overlay ) {
14 - return;
15 - }
16 -
17 18 /**
18 19 * Gets the amount that the window is scrolled.
19 20 *
20 21 * @return int The distance from the top of the document.
@@ -28,9 +29,9 @@
28 29 }
29 30
30 31 if ( overlay.classList.contains( 'ads-active' ) ) {
31 32 var adsCookieValue = document.cookie.replace(
32 - /(?:(?:^|.*;\s*)personalized-ads-consent\s*\=\s*([^;]*).*$)|^.*$/,
33 + /(?:(?:^|.*;\s*)personalized-ads-consent\s*=\s*([^;]*).*$)|^.*$/,
33 34 '$1'
34 35 );
35 36 if ( '' !== cookieValue && '' !== adsCookieValue && ! inCustomizer ) {
36 37 overlay.parentNode.removeChild( overlay );