1if (!window.sessionStorage.getItem("landing")) { 2 window.sessionStorage.setItem("landing", window.location.pathname); 3} 4 5document.addEventListener("click", onElementClick, false); 6 7function checkIfUrlHasSignup(e) { 8 if (e.target.href && e.target.href.indexOf("signup") !== -1) { 9 return true; 10 } else { 11 return false; 12 } 13} 14 15function onElementClick(event) { 16 if (checkIfUrlHasSignup(event)) { 17 event.preventDefault(); 18 var modifiedUrl; 19 if (event.target.href.indexOf("?") !== -1) { 20 modifiedUrl = 21 event.target.href + 22 "&landing=" + 23 window.sessionStorage.getItem("landing") + 24 "&source=" + 25 window.location.pathname; 26 } else { 27 modifiedUrl = 28 event.target.href + 29 "?landing=" + 30 window.sessionStorage.getItem("landing") + 31 "&source=" + 32 window.location.pathname; 33 } 34 window.open(modifiedUrl, '_blank'); 35 } 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.