1var openedFB = false; 2 3function moveLeft() { 4 var sidebar = document.getElementById('facebookSidebar'); 5 6 if (openedFB) { 7 sidebar.style.right = '350px'; 8 sidebar.style.left = ''; 9 animateRightToLeft(sidebar, 350, 0); 10 } else { 11 sidebar.style.right = '0px'; 12 sidebar.style.left = ''; 13 animateRightToLeft(sidebar, 0, 350); 14 } 15 16 openedFB = !openedFB; 17} 18 19function animateRightToLeft(element, start, end) { 20 var current = start; 21 var increment = (end > start) ? 5 : -5; 22 23 function step() { 24 current += increment; 25 element.style.right = current + 'px'; 26 27 if ((increment > 0 && current < end) || (increment < 0 && current > end)) { 28 requestAnimationFrame(step); 29 } else { 30 element.style.right = end + 'px'; // Ensure it ends exactly at the end position 31 } 32 } 33 34 requestAnimationFrame(step); 35}
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.