PageSourceSearch

https://www.comap-control.com/js/tooltipMapPicker.js?v=les2K8GT9pBuTvi7e4uoPcUG5e3lkE33TL2343uYKa4

js comap-control.com collected 2026-10-03 23:28:59 UTC 3,581 bytes, 1 lines download raw bytes

1const tooltipMapPicker=()=>{let t=[];const e=document.querySelector(".map"),o=document.querySelector(".map img"),l=document.querySelector(".ktc-form-wrapper"),a=l.querySelector("#kentico-form_TooltipsMap_Value");let i="";""!=a.value&&(i=JSON.parse(a.value));const s=l.querySelector("#tooltip_popup"),n=s.querySelectorAll("input, textarea"),r=s.querySelector("#submit_button"),c=s.querySelector("#delete_button");let f=!1;const p=17;let u,d;function y(){n.forEach((t=>{t.disabled=!t.disabled})),f?(n.forEach((t=>{t.value=""})),t.forEach((t=>{t.classList.remove("active")})),r.style.display="none",c.style.display="none"):(r.style.display="inline-block",c.style.display="inline-block"),f=!f}function m(t){n.forEach((e=>{e.animate({backgroundColor:t},1e3),e.animate({backgroundColor:"white"},2e3)}))}function g(){const e=[];t.forEach((t=>{e.push({TooltipName:t.getAttribute("data-tooltipname"),TooltipContent:t.getAttribute("data-tooltipcontent"),TopOffset:t.getAttribute("data-topOffset"),LeftOffset:t.getAttribute("data-leftOffset")})})),a.value=JSON.stringify(e)}function b(e){const a=s.querySelector("#kentico-form_TooltipsMap_TopOffset"),i=s.querySelector("#kentico-form_TooltipsMap_LeftOffset"),b=s.querySelector("#kentico-form_TooltipsMap_TooltipName"),h=s.querySelector("#kentico-form_TooltipsMap_TooltipContent");if(!(a&&i&&b&&h))return;const O=e.target;!function(e){d=p/o.clientWidth*100,u=p/o.clientHeight*100,t.forEach((t=>{t.classList.remove("active")})),e.target.classList.add("active"),f||y()}(e),a.value=O.dataset.topoffset,i.value=O.dataset.leftoffset,b.value=O.dataset.tooltipname,h.value=O.dataset.tooltipcontent,r.onclick=()=>function(t,e){Array.from(e).forEach((e=>{t.dataset[e.id.split("_").slice(-1)[0].toLowerCase()]=e.value})),t.style.top=`${(parseFloat(e[2].value.substring(0,e[2].value.length-1))-parseFloat(u)).toFixed(2)}%`,t.style.left=`${(parseFloat(e[3].value.substring(0,e[3].value.length-1))-parseFloat(d)).toFixed(2)}%`,m("green"),g(),y()}(O,n),c.onclick=()=>function(e){e.target.remove(),t=l.querySelectorAll(".js-tooltip"),m("red"),g(),y()}(e)}function h(o){const a=document.createElement("span");a.setAttribute("class","tooltip js-tooltip"),a.style.top=o.TopOffset,a.style.left=o.LeftOffset,a.setAttribute("data-topOffset",o.TopOffset),a.setAttribute("data-leftOffset",o.LeftOffset),u>0&&d>0&&(a.setAttribute("data-topOffset",`${(parseFloat(o.TopOffset.substring(0,o.TopOffset.length-1))+parseFloat(u)).toFixed(2)}%`),a.setAttribute("data-leftOffset",`${(parseFloat(o.LeftOffset.substring(0,o.LeftOffset.length-1))+parseFloat(d)).toFixed(2)}%`)),a.setAttribute("data-tooltipname",o.TooltipName),a.setAttribute("data-tooltipcontent",o.TooltipContent),e.appendChild(a),t=l.querySelectorAll(".js-tooltip"),t.forEach((t=>{t.onclick=b}))}o.onmouseover=()=>{o.style.border="1px solid lightgrey",o.style.margin="1px"},e.onmouseout=()=>{o.style.border="",o.style.margin="2px"},function(){if(n.forEach((t=>{t.disabled=!0})),r.style.display="none",c.style.display="none",function(){const t=e.querySelector("#map-img");t&&setTimeout((()=>{const e=l.querySelector(".ktc-thumbnail-image");null!==e&&t.setAttribute("src",e.getAttribute("src"))}),100)}(),i&&function(t){t.forEach((t=>{h(t)}))}(i),e){const t=e.querySelector("img");t.onclick=e=>{const l=t.getBoundingClientRect(),a=l.top+window.pageYOffset,i=l.left+window.pageXOffset,s=e.pageX-i-p,n=e.pageY-a-p;d=p/o.clientWidth*100,u=p/o.clientHeight*100;const r=`${(s/t.clientWidth*100).toFixed(2)}%`;h({TopOffset:`${(n/t.clientHeight*100).toFixed(2)}%`,LeftOffset:r,TooltipName:"",TooltipContent:""})}}}()};

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.