1const getCookie = function(cname) { 2 // eslint-disable-line 3 const name = `${cname}=`; 4 const decodedCookie = decodeURIComponent(document.cookie); 5 const ca = decodedCookie.split(";"); 6 for (let i = 0; i < ca.length; i += 1) { 7 let c = ca[i]; 8 while (c.charAt(0) === " ") { 9 c = c.substring(1); 10 } 11 if (c.indexOf(name) === 0) { 12 return c.substring(name.length, c.length); 13 } 14 } 15 return ""; 16}; 17 18function activateTooltips() { 19 $('[data-toggle="tooltip"]').tooltip(); 20} 21 22var initSandboxTour = null; 23 24$(function() { 25 // TODO @radu (or React) 26 // $('.mailbots-list-item').mouseover(function(e) {$(this).find('.bottom-bar').removeClass("hidden")}); 27 28 // cmd + enter on Sandbox page to submit emulator 29 $(document).keydown(function(event) { 30 if ((event.metaKey || event.ctrlKey) && event.keyCode == 13) { 31 $("#email-editor-send-btn").click(); 32 } 33 34 // TODO: Focus followup date with command 35 }); 36 37 // Focus followup command bar on load 38 // TODO: Debug async 39 window.setTimeout(() => $("#cmd-bar").focus(), 1000); 40 41 $("#task-actions").click(function(e) { 42 e.stopPropagation(); 43 }); 44 45 $("#repeat-last-action").click(function() { 46 $(".fut-emulator")[0].repeatLastAction(); 47 }); 48 49 $("#expand-logs").click(function() { 50 if ($("#expand-logs").is(":checked")) { 51 $(".log-details").each(function(i, el) { 52 const logLineId = $(el).attr("data-logId"); 53 $(el).show();
54 // $(`#task-details${logLineId}-collapse`).click(); 55 // $(`#task-details${logLineId}`).collapse('show'); 56 $(`#response${logLineId}`).collapse("show"); 57 $(`#request${logLineId}`).collapse("show"); 58 }); 59 } else { 60 $(".log-details").each(function(i, el) { 61 $(el).hide(); 62 }); 63 } 64 }); 65 66 $(".hover-panel .main-panel").click(function(e) { 67 e.preventDefault(); 68 window.location.href = $(this).data("href"); 69 }); 70 71 initSandboxTour = function initSandboxTour() { 72 // Scripts linked in index.html and to Window object 73 var tour = new Tour({ 74 steps: [ 75 { 76 element: "#test-menu", 77 title: "Title of my step", 78 content: "Content of my step" 79 }, 80 { 81 element: "#test-email-commands", 82 title: "Title of my step", 83 content: "Content of my step" 84 } 85 ] 86 }); 87 88 tour.init(); 89 tour.start(); 90 }; 91 92 activateTooltips(); 93 94 const elementPosition = $("#sandbox-emulator").offset(); 95 if (elementPosition) { 96 $(window).scroll(function() { 97 if ($(window).scrollTop() > elementPosition.top) { 98 $("#sandbox-emulator") 99 .css("position", "fixed") 100 .css("top", "0") 101 .css("width", "50%") 102 .css("overflow-y", "scroll"); 103 } else { 104 $("#sandbox-emulator") 105 .css("position", "static") 106 .css("width", "100%") 107 .css("overflow-y", "scroll"); 108 } 109 }); 110 } 111 112 if ($(".log-date").html()) { 113 var naturalDate = moment($(".log-date").html() + " GMT").fromNow(); 114 $(".log-date").html(naturalDate); 115 } 116});
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.