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 try 208 { 209 sessionStorage.setItem( 'aviaCookieRefused', newCookieContents ); 210 } 211 catch( err ) 212 { 213 avia_log( 'Info - Session Storage: Browser memory limit reached. Your Browser does not offer session storage to save cookie settings.' ); 214 avia_log( err ); 215 } 216 } 217 218 $_html.addClass( 'av-cookies-session-refused' ); 219 $_html.removeClass( 'av-cookies-user-silent-accept' ); 220 221 aviaCookieConsentBar.addClass( 'cookiebar-hidden' ); 222 aviaCookieConsentBadge.addClass( 'avia_pop_class' ); 223 set_cookie_consent_aria_attr( 'hide' ); 224 225 if( $_html.hasClass( 'avia-cookie-reload-no-accept' ) ) 226 { 227 if( reload_tooltip.length > 0 ) 228 { 229 reload_tooltip.closest( '.avia-privacy-reload-tooltip-link-container' ).addClass( 'av-display-tooltip' ); 230 reload_tooltip.trigger( 'click' ); 231 } 232 location.reload( true ); 233 } 234 235 button.trigger( 'avia-cookie-settings-changed' ); 236 }); 237 238 // info button 239 if( 'function' == typeof avia_cookie_consent_modal_callback.init ) 240 { 241 var options = { 242 activate: '.avia-cookie-consent-button.avia-cookie-info-btn', 243 source: '#av-consent-extra-info' 244 }; 245 246 avia_cookie_consent_modal_callback.init( options ); 247 248 $( '.avia-cookie-consent-button.avia-cookie-info-btn' ).on( 'click', function(e) { 249 if( 'function' == typeof avia_cookie_consent_modal_callback.open ) 250 { 251 avia_cookie_consent_modal_callback.open( this ); 252 } 253 }); 254 } 255 else 256 { 257 $('.avia-cookie-consent-button.avia-cookie-info-btn').on( 'click', function(e) { 258 e.preventDefault(); 259 260 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"; 261 var msg = 'string' == typeof AviaPrivacyCookieAdditionalData.no_lightbox ? AviaPrivacyCookieAdditionalData.no_lightbox : def_msg; 262 263 alert( msg ); 264 }); 265 } 266 267 // Badge 268 aviaCookieConsentBadge.on( 'click', function(e) { 269 e.preventDefault(); 270 271 aviaCookieConsentBar.removeClass('cookiebar-hidden'); 272 aviaCookieConsentBadge.removeClass('avia_pop_class'); 273 set_cookie_consent_aria_attr( 'show' ); 274 }); 275 276 function avia_magnificPopup_init( options ) 277 { 278 var new_options = { 279 type:'inline', 280 midClick: true, // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href. 281 closeOnBgClick: false, 282 enableEscapeKey: false, 283 closeOnContentClick: false, 284 overflowY: scroll, 285 items:{ 286 src: '#av-consent-extra-info', 287 type:'inline' 288 }, 289 callbacks: { 290 open: function() { 291 $('html').css( 292 { overflow: 'hidden', 293 'max-height': '100%' 294 }); 295 }, 296 close: function() { 297 $('html').css( 298 { overflow: '', 299 'max-height': '' 300 }); 301 } 302 } 303 }; 304 305 new_options = $.extend( {}, $.avia_utilities.av_popup, new_options ); 306 $( '.avia-cookie-info-btn' ).magnificPopup( new_options ); 307 } 308 309 function avia_magnificPopup_close() 310 { 311 $.magnificPopup.close();
312 $_html.trigger( 'avia-cookie-settings-changed', 'avia_magnificPopup_close' ); 313 } 314 315 function set_cookie_paths() 316 { 317 var paths = {}; 318 if( 'undefined' != typeof AviaPrivacyCookieAdditionalData.remove_custom_cookies ) 319 { 320 $.each( AviaPrivacyCookieAdditionalData.remove_custom_cookies, function( i, custom_cookie ) { 321 var path = custom_cookie.cookie_path.trim(); 322 paths[ custom_cookie.cookie_name ] = ( '' != path ) ? path : '/'; 323 }); 324 } 325 326 return paths; 327 } 328 329 function aviaSetCookie( CookieName, CookieValue, CookieDays, custom_path ) 330 { 331 var path = '/'; 332 if( 'string' == typeof custom_path ) 333 { 334 if( '' != custom_path ) 335 { 336 path = custom_path; 337 } 338 } 339 else if( 'string' == typeof cookie_paths[ CookieName ] ) 340 { 341 path = cookie_paths[ CookieName ]; 342 } 343 344 if( CookieDays ) 345 { 346 var date = new Date(); 347 date.setTime( date.getTime() + ( CookieDays * 24 * 60 * 60 * 1000 ) ); 348 var expires = "; expires=" + date.toGMTString(); 349 } 350 else 351 { 352 var expires = ""; 353 } 354 355 document.cookie = CookieName + "=" + CookieValue + expires + "; path=" + path + '; samesite=strict'; 356 } 357 358 function aviaGetCookieNames( CookieName, check, path ) 359 { 360 check = ( 'undefined' == typeof check ) ? 'equals' : check.trim(); 361 362 var cookiesFound = []; 363 var docCookiesArr = document.cookie.split( ';' ); 364 365 for( var i = 0; i < docCookiesArr.length; i++ ) 366 { 367 var thisCookie = docCookiesArr[i]; 368 var result = thisCookie.split( '=' ); 369 var cookie_name = result[0].trim(); 370 var found = false; 371 372 switch (check) 373 { 374 case 'starts_with': 375 found = cookie_name.startsWith( CookieName ); 376 break; 377 case 'contains': 378 if( ! cookie_name.startsWith( 'aviaPrivacyCustomCookie' ) ) 379 { 380 found = cookie_name.indexOf( CookieName ) != -1; 381 } 382 break; 383 case 'equals': 384 case '': 385 default: 386 found = cookie_name == CookieName; 387 break; 388 } 389 390 if ( found ) 391 { 392 cookiesFound.push( { name: cookie_name, path: path } ); 393 } 394 } 395 396 return cookiesFound; 397 } 398 399 function aviaGetCookie( CookieName ) 400 { 401 var docCookiesArr = document.cookie.split( ';' ); 402 403 for( var i = 0; i < docCookiesArr.length; i++ ) 404 { 405 var thisCookie = docCookiesArr[i]; 406 var result = thisCookie.split( '=' ); 407 var cookie_name = result[0].trim(); 408 409 if ( cookie_name == CookieName ) 410 { 411 cookie_name += '='; 412 var savedContents = thisCookie.replace( cookie_name, '' ); 413 savedContents = savedContents.trim(); 414 return savedContents; 415 } 416 } 417 418 return null; 419 } 420 421 function aviaSetCookieToggles( action ) 422 { 423 var toggles = $( '.av-toggle-switch.av-cookie-disable-external-toggle' ); 424 425 toggles.each( function() { 426 var toggle = $(this); 427 var input = toggle.find( 'input' ); 428 var cookie = input.attr( 'name' ); 429 430 var value = true; 431 var days = 360; 432 433 if( action == 'select_all' ) 434 { 435 if( ! input.prop( 'checked' ) ) 436 { 437 input.trigger( 'click' ); 438 } 439 440 return; 441 } 442 else if( action == 'set' ) 443 { 444 if( input.prop( 'checked' ) && toggle.hasClass( 'av-cookie-save-unchecked' ) || false == input.prop( 'checked' ) && toggle.hasClass( 'av-cookie-save-checked' ) ) 445 { 446 value = false; 447 days = -60; 448 } 449 } 450 else // reset 451 {
452 var hidden = input.closest( '.av-hidden-escential-sc' ); 453 if( 0 == hidden.length ) 454 { 455 input.prop( 'checked', false ); 456 } 457 458 value = false; 459 days = -60; 460 } 461 462 aviaSetCookie( cookie, value, days ); 463 }); 464 465 if( action == 'reset' ) 466 { 467 aviaSetCookie( 'aviaCookieConsent', false, -60 ); 468 aviaSetCookie( 'aviaPrivacyMustOptInSetting', false, -60 ); 469 } 470 else if( action == 'set' ) 471 { 472 if( ! sessionBlocked ) 473 { 474 try 475 { 476 sessionStorage.removeItem( 'aviaCookieRefused' ); 477 } 478 catch( err ) 479 { 480 avia_log( 'Info - Session Storage: Browser refused to clear cookie info.' ); 481 avia_log( err ); 482 } 483 } 484 485 $_html.removeClass( 'av-cookies-session-refused' ); 486 } 487 } 488 489 function monitor_cookies() 490 { 491 if( $_html.hasClass( 'av-cookies-consent-message-bar-only' ) ) 492 { 493 return; 494 } 495 496 var accepted = document.cookie.match(/aviaCookieConsent/) != null; 497 var allow_hide_bar = document.cookie.match(/aviaPrivacyRefuseCookiesHideBar/) != null; 498 var allow_cookies = document.cookie.match(/aviaPrivacyEssentialCookiesEnabled/) != null; 499 var keep_cookies = []; 500 501 if( ! ( accepted && allow_hide_bar && allow_cookies ) ) 502 { 503 if( accepted && allow_hide_bar ) 504 { 505 keep_cookies.push( 'aviaCookieConsent', 'aviaPrivacyRefuseCookiesHideBar', 'aviaPrivacyMustOptInSetting' ); 506 } 507 else if( accepted ) 508 { 509 keep_cookies.push( 'aviaCookieConsent', 'aviaPrivacyMustOptInSetting' ); 510 } 511 512 remove_all_cookies( keep_cookies ); 513 } 514 else 515 { 516 remove_custom_cookies(); 517 } 518 519 update_cookie_info_box(); 520 521 window.setTimeout( monitor_cookies, 300 ); 522 } 523 524 function remove_custom_cookies() 525 { 526 if( 'undefined' == typeof AviaPrivacyCookieAdditionalData.remove_custom_cookies ) 527 { 528 return; 529 } 530 531 $.each( AviaPrivacyCookieAdditionalData.remove_custom_cookies, function( i, custom_cookie ) { 532 var disable = aviaGetCookie( custom_cookie.avia_cookie_name ); 533 if( disable != null ) 534 { 535 var remove_cookies = aviaGetCookieNames( custom_cookie.cookie_name, custom_cookie.cookie_compare_action, custom_cookie.cookie_path ); 536 for( var i = 0; i < remove_cookies.length; i++ ) 537 { 538 aviaSetCookie( remove_cookies[i].name, false, -60, remove_cookies[i].path ); 539 } 540 } 541 }); 542 } 543 544 function remove_all_cookies( keep_cookies ) 545 { 546 if( $_html.hasClass('av-cookies-user-silent-accept') ) 547 { 548 return; 549 } 550 551 if( ! Array.isArray( keep_cookies ) ) 552 { 553 keep_cookies = []; 554 } 555 556 if( $('body').hasClass( 'logged-in' ) && 'undefined' != typeof AviaPrivacyCookieAdditionalData.admin_keep_cookies ) 557 { 558 $.merge( keep_cookies, AviaPrivacyCookieAdditionalData.admin_keep_cookies ); 559 } 560 561 keep_cookies = keep_cookies.map( function( item ) { return item.trim().toLowerCase(); } ); 562 var cookie_array = document.cookie.split(';').map( function( item ) { return item.trim(); } ); 563 564 $.each( cookie_array, function( i, cookie ){ 565 566 if( '' == cookie ) 567 { 568 return; 569 } 570 571 var values = cookie.split( '=' ); 572 var name = values[0].trim(); 573 var test_name = name.toLowerCase(); 574 575 if( $.inArray( test_name, keep_cookies ) >= 0 ) 576 { 577 return; 578 } 579 580 var remove = true; 581 $.each( keep_cookies, function( i, keep_cookie ){ 582 if( keep_cookie.indexOf( '*' ) >= 0 ) 583 { 584 var new_val = keep_cookie.replace( '*', '' ); 585 if( test_name.startsWith( new_val ) ) 586 { 587 remove = false; 588 return false; 589 } 590 } 591 }); 592 593 if( remove ) 594 { 595 aviaSetCookie( name, false, -60 ); 596 return; 597 } 598 }); 599 } 600 601 function update_cookie_info_box() 602 { 603 if( 'undefined' == typeof AviaPrivacyCookieConsent ) 604 { 605 return; 606 } 607 608 var infobox = $( '.avia-cookie-privacy-cookie-info' ); 609 if( 0 == infobox.length ) 610 { 611 return; 612 } 613 614 var info_array = []; 615 var html = ''; 616 617 var cookies = document.cookie.split(';'); 618 cookies.sort( function( a, b ){ 619 var a = a.split( '=' ); 620 var b = b.split( '=' ); 621 622 if( a[0] < b[0] ) 623 { 624 return -1; 625 } 626 else if( a[0] > b[0] ) 627 { 628 return 1; 629 } 630 631 return 0; 632 }); 633 634 $.each( cookies, function( i, cookie ){ 635 if( '' == cookie.trim() ) 636 { 637 return; 638 } 639
640 var values = cookie.split( '=' ); 641 var name = values[0].trim(); 642 var value = 'undefined' != typeof values[1] ? values[1].trim() : ''; 643 var info = ''; 644 645 if( name in AviaPrivacyCookieConsent ) 646 { 647 info += AviaPrivacyCookieConsent[name]; 648 } 649 else 650 { 651 if( '?' in AviaPrivacyCookieConsent ) 652 { 653 info += AviaPrivacyCookieConsent['?']; 654 } 655 else 656 { 657 info += 'Usage unknown'; 658 } 659 660 $.each( AviaPrivacyCookieConsent, function( key, content ){ 661 var first = key.indexOf('*'); 662 var last = key.lastIndexOf('*'); 663 664 if( first < 0 && last < 0 ) 665 { 666 return; 667 } 668 669 if( last == ( key.length - 1 ) ) 670 { 671 key = key.substring( 0, key.length - 1 ); 672 } 673 else 674 { 675 last = -1; 676 } 677 678 if( first == 0 ) 679 { 680 key = key.replace( '*', '' ); 681 } 682 else 683 { 684 first = -1; 685 } 686 687 if( first < 0 && last < 0 ) 688 { 689 return; 690 } 691 692 var found = -1; 693 if( first >= 0 && last >= 0 ) 694 { 695 found = name.indexOf( key ); 696 } 697 else if( last >= 0 ) 698 { 699 found = name.indexOf( key ); 700 if( found != 0 ) 701 { 702 found = -1; 703 } 704 } 705 else 706 { 707 found = name.lastIndexOf( key ); 708 if( found < name.length - key.length ) 709 { 710 found = -1; 711 } 712 } 713 714 if( found >= 0 ) 715 { 716 info = content; 717 return false; 718 } 719 }); 720 721 } 722 723 var out = '<strong>' + name + '</strong> ( ' + value + ' ) - ' + info; 724 info_array.push( out ); 725 }); 726 727 if( info_array.length > 0 ) 728 { 729 html += '<ul>'; 730 731 $.each( info_array, function( i, value ){ 732 html += '<li>' + value + '</li>'; 733 }); 734 735 html += '</ul>'; 736 } 737 else 738 { 739 var msg = 'string' == typeof AviaPrivacyCookieAdditionalData.no_cookies_found ? AviaPrivacyCookieAdditionalData.no_cookies_found : 'No accessable cookies found in domain'; 740 html += '<p><strong>' + msg + '</strong></p>'; 741 } 742 743 infobox.html( html ); 744 } 745 746 function check_fallback_cookie_setting() 747 { 748 var hidden = $('#av-consent-extra-info').find('.av-hidden-escential
748-sc'); 749 if( hidden.length == 0 ) 750 { 751 return; 752 } 753 754 if( oldCookieContents == null ) 755 { 756 return; 757 } 758 759 var data = hidden.data('hidden_cookies'); 760 if( 'undefined' == typeof data ) 761 { 762 return; 763 } 764 765 /** 766 * If we have hidden toggles and user accepted cookies already we click the hidden cookies 767 */ 768 var hidden_cookies = data.split( ',' ); 769 770 $.each( hidden_cookies, function( i, value ){ 771 if( null == aviaGetCookie( value ) ) 772 { 773 hidden.find('input.' + value ).trigger( 'click' ); 774 } 775 }); 776 777 } 778 779 function check_doNotTrack() 780 { 781 if( window.doNotTrack || navigator.doNotTrack || navigator.msDoNotTrack || ( 'undefined' != typeof window.external && 'msTrackingProtectionEnabled' in window.external ) ) 782 { 783 // The browser supports Do Not Track! 784 if( window.doNotTrack == "1" || navigator.doNotTrack == "yes" || navigator.doNotTrack == "1" || navigator.msDoNotTrack == "1" || ( 'undefined' != typeof window.external && 'msTrackingProtectionEnabled' in window.external && window.external.msTrackingProtectionEnabled() ) ) 785 { 786 var input = $( 'input.aviaPrivacyGoogleTrackingDisabled' ); 787 if( input.length > 0 ) 788 { 789 if( null == aviaGetCookie( 'aviaPrivacyGoogleTrackingDisabled' ) ) 790 { 791 input.trigger( 'click' ); 792 } 793 794 var container = input.closest( '.av-toggle-switch' ); 795 var message = container.data( 'disabled_by_browser' ).trim(); 796 container.addClass('av-cookie-sc-disabled'); 797 container.append( '<p><strong>' + message + '</strong></p>'); 798 input.attr( 'disabled', 'disabled' ); 799 } 800 } 801 } 802 } 803 804 function set_cookie_consent_aria_attr( action ) 805 { 806 if( 'undefined' == typeof action ) 807 { 808 action = 'hide'; 809 } 810 811 if( 'show' != action ) 812 { 813 aviaCookieConsentBarWrap.attr( 'aria-hidden', 'true' ); 814 aviaCookieConsentBarWrap.find( '[aria-hidden]').not( '#av-cookie-consent-badge' ).attr( 'aria-hidden', 'true' ); 815 } 816 else 817 { 818 aviaCookieConsentBarWrap.attr( 'aria-hidden', 'false' ); 819 aviaCookieConsentBarWrap.find( '[aria-hidden]').not( '#av-cookie-consent-badge' ).attr( 'aria-hidden', 'false' ); 820 } 821 } 822 823 update_cookie_info_box(); 824 monitor_cookies(); 825 826 if( $_html.hasClass( 'avia-cookie-consent-modal-show-immediately' ) && ! $_html.hasClass( 'av-cookies-consent-message-bar-only' ) ) 827 { 828 if( ! aviaCookieConsentBar.hasClass( 'cookiebar-hidden' ) ) 829 { 830 $('.avia-cookie-info-btn').trigger('click'); 831 } 832 } 833 834 if( aviaCookieConsentBadge.length > 0 ) 835 { 836 if( aviaCookieConsentBar.hasClass( 'cookiebar-hidden' ) ) 837 { 838 aviaCookieConsentBadge.addClass( 'avia_pop_class' ); 839 } 840 else 841 { 842 aviaCookieConsentBadge.removeClass( 'avia_pop_class' ); 843 } 844 } 845 }); 846 847})( 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.