1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10( function ( $ ) { 11 /** 12 * bind 13 */ 14 $( document ).ready( function () { 15 var value; 16 $( ub_cookie_notice.id + ' .ub-cn-set-cookie' ).on( 'click', function ( e ) { 17 e.preventDefault(); 18 $( this ).setUBCookieNotice(); 19 } ); 20 /** 21 * it ws already shown 22 */ 23 value = $.fn.BrandaGetCookieValue( ub_cookie_notice.cookie.name + '_close' ); 24 if ( 'hide' === value ) { 25 $( ub_cookie_notice.id ).hide(); 26 } 27 } ); 28 29 /** 30 * get cookie value 31 */ 32 $.fn.BrandaGetCookieValue = function( cname ) { 33 var name = cname + "="; 34 var decodedCookie = decodeURIComponent(document.cookie); 35 var ca = decodedCookie.split(';'); 36 for(var i = 0; i <ca.length; i++) { 37 var c = ca[i]; 38 while (c.charAt(0) == ' ') { 39 c = c.substring(1); 40 } 41 if (c.indexOf(name) == 0) { 42 return c.substring(name.length, c.length); 43 } 44 } 45 return ""; 46 } 47 48 /** 49 * set Cookie Notice 50 */ 51 $.fn.setUBCookieNotice = function () { 52 var notice = $( ub_cookie_notice.id ); 53 var expires = new Date(); 54 var value = parseInt( expires.getTime() ); 55 var cookie = ''; 56 /** 57 * set time 58 */ 59 value = parseInt( expires.getTime() ); 60 /** 61 * add time 62 */ 63 value += parseInt( ub_cookie_notice.cookie.value ) * 1000; 64 /** 65 * add time zone 66 */ 67 value += parseInt( ub_cookie_notice.cookie.timezone ) * 1000; 68 /** 69 * set time 70 */ 71 expires.setTime( value ); 72 /** 73 * add cookie timestamp 74 */ 75 cookie = ub_cookie_notice.cookie.name + '=' + value/1000 + ';'; 76 cookie += ' expires=' + expires.toUTCString() + ';'; 77 if ( ub_cookie_notice.cookie.domain ) { 78 cookie += ' domain=' + ub_cookie_notice.cookie.domain + ';'; 79 } 80 /** 81 * Add cookie now (fix cache issue) 82 */ 83 cookie += ' path=' + ub_cookie_notice.cookie.path + ';'; 84 if ( 'on' === ub_cookie_notice.cookie.secure ) { 85 cookie += ' secure;' 86 } 87 document.cookie = cookie; 88 cookie = ub_cookie_notice.cookie.name + '_close=hide;'; 89 cookie += ' expires=;'; 90 if ( ub_cookie_notice.cookie.domain ) { 91 cookie += ' domain=' + ub_cookie_notice.cookie.domain + ';'; 92 } 93 cookie += ' path=' + ub_cookie_notice.cookie.path + ';'; 94 if ( 'on' === ub_cookie_notice.cookie.secure ) { 95 cookie += ' secure;' 96 } 97 document.cookie = cookie; 98 /** 99 * set user meta 100 */ 101 if ( undefined !== ub_cookie_notice.logged && 'yes' === ub_cookie_notice.logged ) { 102 var data = { 103 'action': 'ub_cookie_notice', 104 'user_id': ub_cookie_notice.user_id, 105 'nonce': ub_cookie_notice.nonce 106 }; 107 $.post( ub_cookie_notice.ajaxurl, data ); 108 } else { 109 // Dimiss the notice for visitor. 110 var data = { 111 'action': 'ub_dismiss_visitor_notice', 112 'nonce': ub_cookie_notice.nonce 113 }; 114 $.post( ub_cookie_notice.ajaxurl, data ); 115 } 116 /** 117 * reload 118 */ 119 if ( undefined !== ub_cookie_notice.reloading && 'on' === ub_cookie_notice.reloading ) { 120 document.location.reload( true ); 121 return; 122 } 123 /** 124 * hide 125 */ 126 var animation = undefined !== ub_cookie_notice.animation? ub_cookie_notice.animation:'none'; 127 switch( animation ) { 128 case 'fade': 129 notice.fadeOut( 400 ); 130 break; 131 case 'slide': 132 notice.slideUp( 400 ); 133 break; 134 default: 135 notice.hide(); 136 } 137 }; 138 139} )( jQuery ); 140 141}
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.