1let currentQueryString = parseQueryString(location.search.substring(1)); 2let base = "https://app.clean.email"; 3// let queryString = {} 4 5function getJSON(url, callback) { 6 let request = new XMLHttpRequest() 7 request.onload = function () { 8 try { 9 let response = JSON.parse(request.response) 10 callback(response) 11 } catch (exception) {} 12 } 13 request.open("get", url, true) 14 request.setRequestHeader("Accept", "application/json") 15 request.send() 16} 17function getQueryParameters(key) { 18 if (currentQueryString[key]) { 19 return currentQueryString[key]; 20 } 21 else { 22 return ""; 23 } 24} 25 26function parseQueryString(string) { 27 if (!string) { 28 return {}; 29 } 30 try { 31 return JSON.parse('{"' + string.replace(/&/g, '","').replace(/=/g,'":"') + '"}', function(key, value) { return key===""?value:decodeURIComponent(value) }); 32 } catch (e) { 33 return {} 34 } 35} 36 37function decorateTransitionURL(url, e, extra) { 38 if (e && e.getAttribute("data-decorate") == "false" || !url || !url.length) { 39 return url 40 } 41 // if (url.charAt(0) === "/") { 42 // return url 43 // } 44 var urlQueryString = {} 45 var parts = url.split("?"); 46 if (parts[1]) { 47 urlQueryString = parseQueryString(parts[1]); 48 url = parts[0]; 49 } 50 51 var append = ""; 52 if (extra) { 53 append = extra + "&" 54 } 55 urlQueryString = Object.assign({}, urlQueryString, currentQueryString); 56 57 Object.keys(urlQueryString).forEach(function (key) { 58 if (!["_ga"].includes(key)) { 59 append += key + "=" + encodeURIComponent(urlQueryString[key]) + "&"; 60 } 61 }) 62 // if (typeof ga === 'function') { 63 // ga(function() { 64 // var trackers = ga.getAll(); 65 // append = append + trackers[0].get('linkerParam'); 66 // }); 67 // } 68 return (url + (append ? "?" + append : "")).replace(/\&$/, ''); 69} 70 71function objectify(element) { 72 // this method ensures proper rendering of SVG in safari by wrapping them into an object. 73 if (navigator.userAgent.toLowerCase().indexOf("safari") !== -1 && navigator.userAgent.toLowerCase().indexOf("chrome") === -1) { 74 let object = document.createElement("object") 75 let ratio = element.offsetHeight/element.offsetWidth; 76 77 if (element.id) { 78 object.setAttribute("id", element.id) 79 } 80 81 object.classList = element.classList 82 object.setAttribute("data", element.src) 83 object.setAttribute("type", "image/svg+xml") 84 object.setAttribute("ratio", ratio) 85 86 object.style.height = element.offsetHeight + "px" 87 88 object.addEventListener("load", function (o) { 89 o.target.style.height = "unset"; 90 }) 91 92 element.parentNode.replaceChild(object, element) 93 if (ratio !== 1) { 94 // this will resize the object because object sizing is not proportional by default as image sizing is 95 window.addEventListener("resize", function (o) { 96 object.style.width = "unset" 97 object.style.height = "unset" 98 let expectedWidth = Math.floor(object.offsetHeight / ratio); 99 object.style.width = expectedWidth + "px"; 100 if (expectedWidth !== object.offsetWidth) { 101 object.style.width = object.offsetWidth + "px"; 102 object.style.height = object.offsetWidth * ratio + "px"; 103 } 104 // if (object.offsetWidth !== object.offsetHeight / ratio) { 105 // 106 // } 107 }) 108 } 109 } 110} 111 112//common js 113 114// $(document).ready(function(){ 115// languageSwitcherToggleButton(); 116// }); 117// 118// //footer language switcher button display function 119// var languageSwitcherToggleButton = function(){ 120// $('.footer-button').click(function(){ 121// $('.dropup-content').toggle(); 122// }); 123// };
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.