1function switchFeature( name ) { 2 var feature = getCookie( '_pre-assistant-config-' + name ); 3 4 if ( ! feature || feature === '0' ) { 5 setCookie( '_pre-assistant-config-' + name, 1 ); 6 } else { 7 setCookie( '_pre-assistant-config-' + name, 0 ); 8 } 9 window.location.reload(); 10} 11 12function setCookie( param, value, exdays ) { 13 var date = new Date(); 14 date.setTime( date.getTime() + ( exdays * 24 * 60 * 60 * 1000 ) ); 15 16 var expires = 'expires=' + date.toUTCString(); 17 18 document.cookie = param + '=' + value + ';' + expires + ';path=/'; 19} 20 21function getCookie( param ) { 22 var name = param + '='; 23 var cookie_list = document.cookie.split( ';' ); 24 25 for ( var i = 0; i < cookie_list.length; i++ ) { 26 var cookie = cookie_list[ i ]; 27 28 while ( cookie.charAt( 0 ) === ' ' ) { 29 cookie = cookie.substring( 1 ); 30 } 31 if ( cookie.indexOf( name ) === 0 ) { 32 return cookie.substring( name.length, cookie.length ); 33 } 34 } 35 return ''; 36}
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.