1(function($) { 2 3 function getCookie(cname) { 4 var name = cname + "="; 5 var decodedCookie = decodeURIComponent(document.cookie); 6 var ca = decodedCookie.split(';'); 7 for (var i = 0; i < ca.length; i++) { 8 var c = ca[i]; 9 while (c.charAt(0) == ' ') { 10 c = c.substring(1); 11 } 12 if (c.indexOf(name) == 0) { 13 return c.substring(name.length, c.length); 14 } 15 } 16 return ""; 17 } 18 19 $('.netl-social-media-static-enable').click(function(e) { 20 21 e.preventDefault(); 22 23 var type = $(this).data('content'); 24 25 var allowedSocialMedia = (getCookie('netl-social-media') && (getCookie('netl-social-media') != '1')) ? JSON.parse(getCookie('netl-social-media')) : []; 26 27 if (allowedSocialMedia.indexOf(type) == -1) { 28 allowedSocialMedia.push(type); 29 } 30 document.cookie = "netl-social-media=" + JSON.stringify(allowedSocialMedia) + "; path=/"; 31 32 location.reload(true); 33 34 }); 35 36})(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.