1 2if( typeof window.avia_cookie_consent_modal_callback == 'undefined' ) 3{ 4 window.avia_cookie_consent_modal_callback = { 5 init: null, 6 open: null, 7 close: null 8 }; 9} 10 11 12var avia_cookie_consent_modal_callback = window.avia_cookie_consent_modal_callback; 13 14 15 16( function($) 17{ 18 19 "use strict"; 20 21 /** 22 * enfold\includes\helper-privacy.php handler_manage_cookies() also checks cookies with php 23 * ========================================================================================= 24 */ 25 26 $( function() 27 { 28 // FF throws error when all cookies blocked !! 29 var sessionBlocked = false; 30 try 31 { 32 var test = sessionStorage.getItem( 'aviaCookieRefused' ); 33 } 34 catch(e) 35 { 36 sessionBlocked = true; 37 } 38 39 var $_html = $('html'); 40 var aviaCookieConsentBarWrap = $( '.avia-cookie-consent-wrap' ); 41 var aviaCookieConsentBar = $('.avia-cookie-consent'); 42 var aviaCookieConsentBadge = $('#av-cookie-consent-badge'); 43 var accept_btn = $('.avia-cookie-consent-button.avia-cookie-close-bar'); 44 var newCookieContents = aviaCookieConsentBar.attr('data-contents'); 45 var oldCookieContents = aviaGetCookie( 'aviaCookieConsent' ); 46 var aviaCookieRefused = ! sessionBlocked ? sessionStorage.getItem( 'aviaCookieRefused' ) : null; 47 var forceHideMessageBar = aviaGetCookie('aviaPrivacyRefuseCookiesHideBar'); 48 var cookie_paths = set_cookie_paths(); // object Cookie name: path - filled from custom cookies 49 var reload_tooltip = $_html.find( 'a.avia-privacy-reload-tooltip-link' ).first(); 50 var accept_essential_cookies = $_html.hasClass( 'av-cookies-essential-only' ); 51 52 /** 53 * Set a class to avoid calls to sessionStorage 54 */ 55 if( sessionBlocked || aviaCookieRefused ) 56 { 57 $_html.addClass( 'av-cookies-session-refused' ); 58 } 59 60 /** 61 * Force setting of needed cookies on new pageload 62 */ 63 if( accept_essential_cookies && oldCookieContents == null ) 64 { 65 check_fallback_cookie_setting(); 66 aviaSetCookieToggles( 'set' ); 67 68 aviaSetCookie( 'aviaCookieConsent', 'xxxxx||v1.0', 365 ); 69 aviaSetCookie( 'aviaPrivacyMustOptInSetting', true, 365 ); 70 } 71 72 /** 73 * If user refuses cookies and silent accept of cookies is selected we need to remove this if we are in same session 74 */ 75 if( sessionBlocked || aviaCookieRefused || document.cookie.match(/aviaCookieConsent/) ) 76 { 77 $_html.removeClass( 'av-cookies-user-silent-accept' ); 78 } 79 80 if( reload_tooltip.length > 0 ) 81 { 82 new $.AviaTooltip({"class": 'avia-privacy-reload-tooltip', data: 'avia-privacy-reload-tooltip', event:'click', position:'top', scope: "body", attach:'element', within_screen: true}); 83 } 84 85 if( 'undefined' != typeof $.avia_utilities.av_popup && 'function' != typeof avia_cookie_consent_modal_callback.init ) 86 { 87 avia_cookie_consent_modal_callback.init = avia_magnificPopup_init; 88 avia_cookie_consent_modal_callback.open = null; 89 avia_cookie_consent_modal_callback.close = avia_magnificPopup_close; 90 } 91 92 check_fallback_cookie_setting(); 93 94 if( $_html.hasClass( 'avia-cookie-check-browser-settings' ) ) 95 { 96 check_doNotTrack(); 97 } 98 99 if( newCookieContents != oldCookieContents ) 100 { 101 oldCookieContents = null; 102 } 103 104 var msgbar_changed = oldCookieContents == null; // message bar content changed - we must show message bar again 105 106 if( ! $_html.hasClass( 'av-cookies-consent-message-bar-only' ) ) 107 { 108 if( ! forceHideMessageBar ) 109 { 110 msgbar_changed = true; // user disabled hiding message bar and cookies via toggle - we must show it again. 111 } 112 113 if( aviaCookieRefused ) 114 { 115 msgbar_changed = false; // do not ask again as long as in same session 116 } 117 118 if( ! ( oldCookieContents || aviaCookieRefused ) || msgbar_changed ) 119 { 120 aviaCookieConsentBar.removeClass('cookiebar-hidden'); 121 set_cookie_consent_aria_attr( 'show' ); 122 } 123 } 124 else if( msgbar_changed ) 125 { 126 aviaCookieConsentBar.removeClass('cookiebar-hidden'); 127 set_cookie_consent_aria_attr( 'show' ); 128 } 129 130 accept_btn.on( 'click', function(e) { 131 e.preventDefault(); 132 133 var button = $(this); 134 135 if( button.hasClass( 'avia-cookie-select-all' ) ) 136 { 137 aviaSetCookieToggles( 'select_all' ); 138 } 139 140 aviaSetCookie( 'aviaCookieConsent', newCookieContents, 365 ); 141 aviaCookieConsentBar.addClass('cookiebar-hidden'); 142 aviaCookieConsentBadge.addClass('avia_pop_class'); 143 set_cookie_consent_aria_attr( 'hide' ); 144 145 if( button.hasClass('avia-cookie-consent-modal-button') ) 146 { 147 if( 'function' == typeof avia_cookie_consent_modal_callback.close ) 148 { 149 avia_cookie_consent_modal_callback.close( this ); 150 } 151 } 152
153 if( $_html.hasClass( 'av-cookies-consent-message-bar-only' ) ) 154 { 155 return; 156 } 157 158 if( $_html.hasClass( 'av-cookies-needs-opt-in' ) ) 159 { 160 aviaSetCookie( 'aviaPrivacyMustOptInSetting', true, 365 ); 161 } 162 else 163 { 164 aviaSetCookie( 'aviaPrivacyMustOptInSetting', false, -60 ); 165 } 166 167 aviaSetCookieToggles( 'set' ); 168 169 if( $_html.hasClass( 'avia-cookie-reload-accept' ) ) 170 { 171 if( reload_tooltip.length > 0 ) 172 { 173 reload_tooltip.closest( '.avia-privacy-reload-tooltip-link-container' ).addClass( 'av-display-tooltip' ); 174 reload_tooltip.trigger( 'click' ); 175 } 176 location.reload( true ); 177 } 178 179 button.trigger( 'avia-cookie-settings-changed' ); 180 }); 181 182 // hide and dismiss button 183 $('.avia-cookie-consent-button.avia-cookie-hide-notification').on( 'click', function(e) { 184 e.preventDefault(); 185 186 var button = $(this); 187 188 if( 'undefined' != typeof AviaPrivacyCookieAdditionalData.cookie_refuse_button_alert && '' != AviaPrivacyCookieAdditionalData.cookie_refuse_button_alert.trim() ) 189 { 190 if( ! window.confirm( AviaPrivacyCookieAdditionalData.cookie_refuse_button_alert ) ) 191 { 192 return; 193 } 194 } 195 196 if( button.hasClass( 'avia-cookie-consent-modal-button' ) ) 197 { 198 if( 'function' == typeof avia_cookie_consent_modal_callback.close ) 199 { 200 avia_cookie_consent_modal_callback.close( this ); 201 } 202 } 203 204 aviaSetCookieToggles( 'reset' ); 205 if( ! sessionBlocked ) 206 { 207 sessionStorage.setItem( 'aviaCookieRefused', newCookieContents ); 208 } 209 210 $_html.addClass( 'av-cookies-session-refused' ); 211 $_html.removeClass( 'av-cookies-user-silent-accept' ); 212 213 aviaCookieConsentBar.addClass( 'cookiebar-hidden' ); 214 aviaCookieConsentBadge.addClass( 'avia_pop_class' ); 215 set_cookie_consent_aria_attr( 'hide' ); 216 217 if( $_html.hasClass( 'avia-cookie-reload-no-accept' ) ) 218 { 219 if( reload_tooltip.length > 0 ) 220 { 221 reload_tooltip.closest( '.avia-privacy-reload-tooltip-link-container' ).addClass( 'av-display-tooltip' ); 222 reload_tooltip.trigger( 'click' ); 223 } 224 location.reload( true ); 225 } 226 227 button.trigger( 'avia-cookie-settings-changed' ); 228 }); 229 230 // info button 231 if( 'function' == typeof avia_cookie_consent_modal_callback.init ) 232 { 233 var options = { 234 activate: '.avia-cookie-consent-button.avia-cookie-info-btn', 235 source: '#av-consent-extra-info' 236 }; 237 238 avia_cookie_consent_modal_callback.init( options ); 239 240 $( '.avia-cookie-consent-button.avia-cookie-info-btn' ).on( 'click', function(e) { 241 if( 'function' == typeof avia_cookie_consent_modal_callback.open ) 242 { 243 avia_cookie_consent_modal_callback.open( this ); 244 } 245 }); 246 } 247 else 248 { 249 $('.avia-cookie-consent-button.avia-cookie-info-btn').on( 'click', function(e) { 250 e.preventDefault(); 251 252 var def_msg = "We need a lightbox to show the modal popup. Please enable the built in lightbox in Theme Options Tab or include your own modal window plugin.\n\nYou need to connect this plugin in JavaScript with callback wrapper functions - see avia_cookie_consent_modal_callback in file enfold\js\avia-snippet-cookieconsent.js"; 253 var msg = 'string' == typeof AviaPrivacyCookieAdditionalData.no_lightbox ? AviaPrivacyCookieAdditionalData.no_lightbox : def_msg; 254 255 alert( msg ); 256 }); 257 } 258 259 // Badge 260 aviaCookieConsentBadge.on( 'click', function(e) { 261 e.preventDefault(); 262 263 aviaCookieConsentBar.removeClass('cookiebar-hidden'); 264 aviaCookieConsentBadge.removeClass('avia_pop_class'); 265 set_cookie_consent_aria_attr( 'show' ); 266 }); 267 268 function avia_magnificPopup_init( options ) 269 { 270 var new_options = { 271 type:'inline', 272 midClick: true, // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href. 273 closeOnBgClick: false, 274 enableEscapeKey: false, 275 closeOnContentClick: false, 276 overflowY: scroll, 277 items:{ 278 src: '#av-consent-extra-info', 279 type:'inline' 280 }, 281 callbacks: { 282 open: function() { 283 $('html').css( 284 { overflow: 'hidden', 285 'max-height': '100%' 286 }); 287 }, 288 close: function() { 289 $('html').css( 290 { overflow: '', 291 'max-height': '' 292 }); 293 } 294 } 295 }; 296 297 new_options = $.extend( {}, $.avia_utilities.av_popup, new_options ); 298 $( '.avia-cookie-info-btn' ).magnificPopup( new_options ); 299 } 300 301 function avia_magnificPopup_close() 302 { 303 $.magnificPopup.close();
304 $_html.trigger( 'avia-cookie-settings-changed', 'avia_magnificPopup_close' ); 305 } 306 307 function set_cookie_paths() 308 { 309 var paths = {}; 310 if( 'undefined' != typeof AviaPrivacyCookieAdditionalData.remove_custom_cookies ) 311 { 312 $.each( AviaPrivacyCookieAdditionalData.remove_custom_cookies, function( i, custom_cookie ) { 313 var path = custom_cookie.cookie_path.trim(); 314 paths[ custom_cookie.cookie_name ] = ( '' != path ) ? path : '/'; 315 }); 316 } 317 318 return paths; 319 } 320 321 function aviaSetCookie( CookieName, CookieValue, CookieDays, custom_path ) 322 { 323 var path = '/'; 324 if( 'string' == typeof custom_path ) 325 { 326 if( '' != custom_path ) 327 { 328 path = custom_path; 329 } 330 } 331 else if( 'string' == typeof cookie_paths[ CookieName ] ) 332 { 333 path = cookie_paths[ CookieName ]; 334 } 335 336 if( CookieDays ) 337 { 338 var date = new Date(); 339 date.setTime( date.getTime() + ( CookieDays * 24 * 60 * 60 * 1000 ) ); 340 var expires = "; expires=" + date.toGMTString(); 341 } 342 else 343 { 344 var expires = ""; 345 } 346 347 document.cookie = CookieName + "=" + CookieValue + expires + "; path=" + path + '; samesite=strict'; 348 } 349 350 function aviaGetCookieNames( CookieName, check, path ) 351 { 352 check = ( 'undefined' == typeof check ) ? 'equals' : check.trim(); 353 354 var cookiesFound = []; 355 var docCookiesArr = document.cookie.split( ';' ); 356 357 for( var i = 0; i < docCookiesArr.length; i++ ) 358 { 359 var thisCookie = docCookiesArr[i]; 360 var result = thisCookie.split( '=' ); 361 var cookie_name = result[0].trim(); 362 var found = false; 363 364 switch (check) 365 { 366 case 'starts_with': 367 found = cookie_name.startsWith( CookieName ); 368 break; 369 case 'contains': 370 if( ! cookie_name.startsWith( 'aviaPrivacyCustomCookie' ) ) 371 { 372 found = cookie_name.indexOf( CookieName ) != -1; 373 } 374 break; 375 case 'equals': 376 case '': 377 default: 378 found = cookie_name == CookieName; 379 break; 380 } 381 382 if ( found ) 383 { 384 cookiesFound.push( { name: cookie_name, path: path } ); 385 } 386 } 387 388 return cookiesFound; 389 } 390 391 function aviaGetCookie( CookieName ) 392 { 393 var docCookiesArr = document.cookie.split( ';' ); 394 395 for( var i = 0; i < docCookiesArr.length; i++ ) 396 { 397 var thisCookie = docCookiesArr[i]; 398 var result = thisCookie.split( '=' ); 399 var cookie_name = result[0].trim(); 400 401 if ( cookie_name == CookieName ) 402 { 403 cookie_name += '='; 404 var savedContents = thisCookie.replace( cookie_name, '' ); 405 savedContents = savedContents.trim(); 406 return savedContents; 407 } 408 } 409 410 return null; 411 } 412 413 function aviaSetCookieToggles( action ) 414 { 415 var toggles = $( '.av-toggle-switch.av-cookie-disable-external-toggle' ); 416 417 toggles.each( function() { 418 var toggle = $(this); 419 var input = toggle.find( 'input' ); 420 var cookie = input.attr( 'name' ); 421 422 var value = true; 423 var days = 360; 424 425 if( action == 'select_all' ) 426 { 427 if( ! input.prop( 'checked' ) ) 428 { 429 input.trigger( 'click' ); 430 } 431 432 return; 433 } 434 else if( action == 'set' ) 435 { 436 if( input.prop( 'checked' ) && toggle.hasClass( 'av-cookie-save-unchecked' ) || false == input.prop( 'checked' ) && toggle.hasClass( 'av-cookie-save-checked' ) ) 437 { 438 value = false; 439 days = -60; 440 } 441 } 442 else // reset 443 {
444 var hidden = input.closest( '.av-hidden-escential-sc' ); 445 if( 0 == hidden.length ) 446 { 447 input.prop( 'checked', false ); 448 } 449 450 value = false; 451 days = -60; 452 } 453 454 aviaSetCookie( cookie, value, days ); 455 }); 456 457 if( action == 'reset' ) 458 { 459 aviaSetCookie( 'aviaCookieConsent', false, -60 ); 460 aviaSetCookie( 'aviaPrivacyMustOptInSetting', false, -60 ); 461 } 462 else if( action == 'set' ) 463 { 464 if( ! sessionBlocked ) 465 { 466 sessionStorage.removeItem( 'aviaCookieRefused' ); 467 } 468 469 $_html.removeClass( 'av-cookies-session-refused' ); 470 } 471 } 472 473 function monitor_cookies() 474 { 475 if( $_html.hasClass( 'av-cookies-consent-message-bar-only' ) ) 476 { 477 return; 478 } 479 480 var accepted = document.cookie.match(/aviaCookieConsent/) != null; 481 var allow_hide_bar = document.cookie.match(/aviaPrivacyRefuseCookiesHideBar/) != null; 482 var allow_cookies = document.cookie.match(/aviaPrivacyEssentialCookiesEnabled/) != null; 483 var keep_cookies = []; 484 485 if( ! ( accepted && allow_hide_bar && allow_cookies ) ) 486 { 487 if( accepted && allow_hide_bar ) 488 { 489 keep_cookies.push( 'aviaCookieConsent', 'aviaPrivacyRefuseCookiesHideBar', 'aviaPrivacyMustOptInSetting' ); 490 } 491 else if( accepted ) 492 { 493 keep_cookies.push( 'aviaCookieConsent', 'aviaPrivacyMustOptInSetting' ); 494 } 495 496 remove_all_cookies( keep_cookies ); 497 } 498 else 499 { 500 remove_custom_cookies(); 501 } 502 503 update_cookie_info_box(); 504 505 window.setTimeout( monitor_cookies, 300 ); 506 } 507 508 function remove_custom_cookies() 509 { 510 if( 'undefined' == typeof AviaPrivacyCookieAdditionalData.remove_custom_cookies ) 511 { 512 return; 513 } 514 515 $.each( AviaPrivacyCookieAdditionalData.remove_custom_cookies, function( i, custom_cookie ) { 516 var disable = aviaGetCookie( custom_cookie.avia_cookie_name ); 517 if( disable != null ) 518 { 519 var remove_cookies = aviaGetCookieNames( custom_cookie.cookie_name, custom_cookie.cookie_compare_action, custom_cookie.cookie_path ); 520 for( var i = 0; i < remove_cookies.length; i++ ) 521 { 522 aviaSetCookie( remove_cookies[i].name, false, -60, remove_cookies[i].path ); 523 } 524 } 525 }); 526 } 527 528 function remove_all_cookies( keep_cookies ) 529 { 530 if( $_html.hasClass('av-cookies-user-silent-accept') ) 531 { 532 return; 533 } 534 535 if( ! Array.isArray( keep_cookies ) ) 536 { 537 keep_cookies = []; 538 } 539 540 if( $('body').hasClass( 'logged-in' ) && 'undefined' != typeof AviaPrivacyCookieAdditionalData.admin_keep_cookies ) 541 { 542 $.merge( keep_cookies, AviaPrivacyCookieAdditionalData.admin_keep_cookies ); 543 } 544 545 keep_cookies = keep_cookies.map( function( item ) { return item.trim().toLowerCase(); } ); 546 var cookie_array = document.cookie.split(';').map( function( item ) { return item.trim(); } ); 547 548 $.each( cookie_array, function( i, cookie ){ 549 550 if( '' == cookie ) 551 { 552 return; 553 } 554 555 var values = cookie.split( '=' ); 556 var name = values[0].trim(); 557 var test_name = name.toLowerCase(); 558 559 if( $.inArray( test_name, keep_cookies ) >= 0 ) 560 { 561 return; 562 } 563 564 var remove = true; 565 $.each( keep_cookies, function( i, keep_cookie ){ 566 if( keep_cookie.indexOf( '*' ) >= 0 ) 567 { 568 var new_val = keep_cookie.replace( '*', '' ); 569 if( test_name.startsWith( new_val ) ) 570 { 571 remove = false; 572 return false; 573 } 574 } 575 }); 576 577 if( remove ) 578 { 579 aviaSetCookie( name, false, -60 ); 580 return; 581 } 582 }); 583 } 584 585 function update_cookie_info_box() 586 { 587 if( 'undefined' == typeof AviaPrivacyCookieConsent ) 588 { 589 return; 590 } 591 592 var infobox = $( '.avia-cookie-privacy-cookie-info' ); 593 if( 0 == infobox.length ) 594 { 595 return; 596 } 597 598 var info_array = []; 599 var html = ''; 600 601 var cookies = document.cookie.split(';'); 602 cookies.sort( function( a, b ){ 603 var a = a.split( '=' ); 604 var b = b.split( '=' ); 605 606 if( a[0] < b[0] ) 607 { 608 return -1; 609 } 610 else if( a[0] > b[0] ) 611 { 612 return 1; 613 } 614 615 return 0; 616 }); 617 618 $.each( cookies, function( i, cookie ){ 619 if( '' == cookie.trim() ) 620 { 621 return; 622 } 623
624 var values = cookie.split( '=' ); 625 var name = values[0].trim(); 626 var value = 'undefined' != typeof values[1] ? values[1].trim() : ''; 627 var info = ''; 628 629 if( name in AviaPrivacyCookieConsent ) 630 { 631 info += AviaPrivacyCookieConsent[name]; 632 } 633 else 634 { 635 if( '?' in AviaPrivacyCookieConsent ) 636 { 637 info += AviaPrivacyCookieConsent['?']; 638 } 639 else 640 { 641 info += 'Usage unknown'; 642 } 643 644 $.each( AviaPrivacyCookieConsent, function( key, content ){ 645 var first = key.indexOf('*'); 646 var last = key.lastIndexOf('*'); 647 648 if( first < 0 && last < 0 ) 649 { 650 return; 651 } 652 653 if( last == ( key.length - 1 ) ) 654 { 655 key = key.substring( 0, key.length - 1 ); 656 } 657 else 658 { 659 last = -1; 660 } 661 662 if( first == 0 ) 663 { 664 key = key.replace( '*', '' ); 665 } 666 else 667 { 668 first = -1; 669 } 670 671 if( first < 0 && last < 0 ) 672 { 673 return; 674 } 675 676 var found = -1; 677 if( first >= 0 && last >= 0 ) 678 { 679 found = name.indexOf( key ); 680 } 681 else if( last >= 0 ) 682 { 683 found = name.indexOf( key ); 684 if( found != 0 ) 685 { 686 found = -1; 687 } 688 } 689 else 690 { 691 found = name.lastIndexOf( key ); 692 if( found < name.length - key.length ) 693 { 694 found = -1; 695 } 696 } 697 698 if( found >= 0 ) 699 { 700 info = content; 701 return false; 702 } 703 }); 704 705 } 706 707 var out = '<strong>' + name + '</strong> ( ' + value + ' ) - ' + info; 708 info_array.push( out ); 709 }); 710 711 if( info_array.length > 0 ) 712 { 713 html += '<ul>'; 714 715 $.each( info_array, function( i, value ){ 716 html += '<li>' + value + '</li>'; 717 }); 718 719 html += '</ul>'; 720 } 721 else 722 { 723 var msg = 'string' == typeof AviaPrivacyCookieAdditionalData.no_cookies_found ? AviaPrivacyCookieAdditionalData.no_cookies_found : 'No accessable cookies found in domain'; 724 html += '<p><strong>' + msg + '</strong></p>'; 725 } 726 727 infobox.html( html ); 728 } 729 730 function check_fallback_cookie_setting() 731 { 732 var hidden = $('#av-consent-extra-info').find('.av-hidden-escential
732-sc'); 733 if( hidden.length == 0 ) 734 { 735 return; 736 } 737 738 if( oldCookieContents == null ) 739 { 740 return; 741 } 742 743 var data = hidden.data('hidden_cookies'); 744 if( 'undefined' == typeof data ) 745 { 746 return; 747 } 748 749 /** 750 * If we have hidden toggles and user accepted cookies already we click the hidden cookies 751 */ 752 var hidden_cookies = data.split( ',' ); 753 754 $.each( hidden_cookies, function( i, value ){ 755 if( null == aviaGetCookie( value ) ) 756 { 757 hidden.find('input.' + value ).trigger( 'click' ); 758 } 759 }); 760 761 } 762 763 function check_doNotTrack() 764 { 765 if( window.doNotTrack || navigator.doNotTrack || navigator.msDoNotTrack || ( 'undefined' != typeof window.external && 'msTrackingProtectionEnabled' in window.external ) ) 766 { 767 // The browser supports Do Not Track! 768 if( window.doNotTrack == "1" || navigator.doNotTrack == "yes" || navigator.doNotTrack == "1" || navigator.msDoNotTrack == "1" || ( 'undefined' != typeof window.external && 'msTrackingProtectionEnabled' in window.external && window.external.msTrackingProtectionEnabled() ) ) 769 { 770 var input = $( 'input.aviaPrivacyGoogleTrackingDisabled' ); 771 if( input.length > 0 ) 772 { 773 if( null == aviaGetCookie( 'aviaPrivacyGoogleTrackingDisabled' ) ) 774 { 775 input.trigger( 'click' ); 776 } 777 778 var container = input.closest( '.av-toggle-switch' ); 779 var message = container.data( 'disabled_by_browser' ).trim(); 780 container.addClass('av-cookie-sc-disabled'); 781 container.append( '<p><strong>' + message + '</strong></p>'); 782 input.attr( 'disabled', 'disabled' ); 783 } 784 } 785 } 786 } 787 788 function set_cookie_consent_aria_attr( action ) 789 { 790 if( 'undefined' == typeof action ) 791 { 792 action = 'hide'; 793 } 794 795 if( 'show' != action ) 796 { 797 aviaCookieConsentBarWrap.attr( 'aria-hidden', 'true' ); 798 aviaCookieConsentBarWrap.find( '[aria-hidden]').not( '#av-cookie-consent-badge' ).attr( 'aria-hidden', 'true' ); 799 } 800 else 801 { 802 aviaCookieConsentBarWrap.attr( 'aria-hidden', 'false' ); 803 aviaCookieConsentBarWrap.find( '[aria-hidden]').not( '#av-cookie-consent-badge' ).attr( 'aria-hidden', 'false' ); 804 } 805 } 806 807 update_cookie_info_box(); 808 monitor_cookies(); 809 810 if( $_html.hasClass( 'avia-cookie-consent-modal-show-immediately' ) && ! $_html.hasClass( 'av-cookies-consent-message-bar-only' ) ) 811 { 812 if( ! aviaCookieConsentBar.hasClass( 'cookiebar-hidden' ) ) 813 { 814 $('.avia-cookie-info-btn').trigger('click'); 815 } 816 } 817 818 if( aviaCookieConsentBadge.length > 0 ) 819 { 820 if( aviaCookieConsentBar.hasClass( 'cookiebar-hidden' ) ) 821 { 822 aviaCookieConsentBadge.addClass( 'avia_pop_class' ); 823 } 824 else 825 { 826 aviaCookieConsentBadge.removeClass( 'avia_pop_class' ); 827 } 828 } 829 }); 830 831})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.