1jQuery(document).ready(function($){ 2 var form = $('#ct-ultimate-gdpr-block-cookies'); 3 var submit = $('.ct-ultimate-gdpr-cookie-block-btn'); 4 var level = $('#ct-ultimate-gdpr-block-cookies .level').val(); 5 var checkbox = $('.ct-ultimate-gdpr-block-cookies-checkbox'); 6 var notificaton = $('.notification'); 7 var check_count = 0; 8 9 checkbox.on('click', function(){ 10 check_count++; 11 submit.attr('disabled', false); 12 if(checkbox.is(':checked')){ 13 level = 1; 14 } else { 15 level = 5; 16 } 17 }); 18 19 20 21 function Save(e) { 22 23 e.preventDefault(); 24 25 $.post(ct_ultimate_gdpr_cookie.ajaxurl, { 26 "action": "ct_ultimate_gdpr_cookie_consent_give", 27 "level": level 28 }, function () { 29 $(document).trigger("consentUpdated.ctUltimateGdpr", [level]); 30 if (ct_ultimate_gdpr_cookie.reload) { 31 window.location.reload(true); 32 } 33 }).fail(function () { 34 $.post(ct_ultimate_gdpr_cookie.ajaxurl, { 35 "skip_cookies": true, 36 "action": "ct_ultimate_gdpr_cookie_consent_give", 37 "level": level 38 }, function () { 39 setJsCookie(level); 40 $(document).trigger("consentUpdated.ctUltimateGdpr", [level]); 41 if (ct_ultimate_gdpr_cookie.reload) { 42 window.location.reload(true); 43 } 44 }) 45 46 }); 47 48 if(check_count > 0) { 49 notificaton.after('<p class="result-notification">Successfully submitted!</p>'); 50 } 51 52 if(!ct_ultimate_gdpr_cookie.reload){ 53 setTimeout(function(){ 54 $('.result-notification').remove().fadeIn('slow'); 55 },2000); 56 } 57 58 59 } 60 61 62 submit.bind('click', Save); 63 64 65});
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.