1var UI = { 2 3 init: function() { 4 this.navigation(); 5 }, 6 7 navigation: function() { 8 var trigger = $('#bar .trigger'); 9 10 trigger.on('click', function(event) { 11 event.preventDefault(); 12 $('#bar .left').show(); 13 $('#bar .right').addClass('open'); 14 $(this).hide(); 15 }); 16 } 17} 18 19$(document).ready(function() { 20 21 UI.init(); 22 23 // for each header link, click to copy the permalink 24 $('.header-anchor').on('click', function () { 25 var url = location.origin + location.pathname + $(this).attr('href'); 26 27 var $temp = $('<input style="position: absolute; left: -9999px; bottom: 0;">'); 28 $("body").append($temp); 29 $temp.val(url).select(); 30 31 try { 32 document.execCommand("copy"); 33 } catch (e) { 34 alert('Failed to copy to clipboard, please try again or use other browsers.') 35 } 36 }) 37 38 var blogModal = document.getElementById('blog-modal'); 39 var blogIframe = document.getElementById('blog-iframe'); 40 41 if (blogModal && blogIframe) { 42 $('.article-item').on('click', function (event) { 43 event.preventDefault(); 44 blogIframe.src = $(this).attr('href'); 45 blogModal.showModal(); 46 }); 47 48 $('.blog-modal-close').on('click', function () { 49 blogModal.close(); 50 }); 51 52 blogModal.addEventListener('click', function (event) { 53 if (event.target === blogModal) { 54 blogModal.close(); 55 } 56 }); 57 58 blogModal.addEventListener('close', function () { 59 blogIframe.src = ''; 60 }); 61 } 62}); 63 64document.querySelectorAll('pre code:not([class])').forEach(function ($) { 65 $.className = 'no-highlight hljs'; 66}); 67hljs.highlightAll();
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.