PageSourceSearch

https://knoxgp.com.au/wp-content/cache/min/1/webplugin/appointments.js?ver=1788247414

js knoxgp.com.au collected 2026-09-30 13:19:25 UTC 16,336 bytes, 42 lines download raw bytes

1(function(){let he_url='https://healthengine.com.au';let script='currentScript' in document&&document.currentScript?document.currentScript:null;const iframeModalAnchorIdPrefix='he-webplugin-anchor-';const profileAnchorIdPrefix='he-profile-anchor-';let embedIframeInjected=!1;const maximumWaitTimeForGaEventCallback=800;function getLinkerParamFromUrl(url){const urlObj=new URL(url);const urlParams=new URLSearchParams(urlObj.search);return urlParams.get('_gl')}
2function getLinkerParamForIframeAnchor(widid){const linkerAnchor=document.getElementById(iframeModalAnchorIdPrefix+widid);return linkerAnchor?(getLinkerParamFromUrl(linkerAnchor.href)||''):''}
3function getLinkerParamForPracticeProfileAnchor(widid){const profileLink=document.getElementById(profileAnchorIdPrefix+widid);return profileLink?getLinkerParamFromUrl(profileLink.href):''}
4var widget_setup=function(target){if(!target.parentNode)return;if(!!target.getAttribute("data-he-debug")){he_url=''}
5let widid=parseInt(target.getAttribute("data-he-id"),10)||0;let widspecialty=target.getAttribute("data-he-specialty")||'';let widdocid=parseInt(target.getAttribute("data-he-doctor"),10)||0;if(widid>0){if(target.previousSibling&&target.previousSibling.id==='he-webplugin-'+widid)return;var params=[];if(!widspecialty.match(/^ *$/)){params.push('specialty='+widspecialty)}
6if(widdocid>0){params.push('doctor='+widdocid)}
7params.push('source=webplugin');var widget_url=he_url+'/webplugin/?id='+widid+(params.length?'&'+params.join('&'):'');var practice_url=he_url+'/service/'+widid+(params.length?'?'+params.join('&'):'');var fixedonly=!!target.getAttribute('data-he-fixed');var buttononly=!!target.getAttribute('data-he-button');var embedonly=!!target.getAttribute('data-he-embed');if(fixedonly)widget_url+='&trigger=button';if(buttononly)widget_url+='&trigger=button';var touch_device;try{document.createEvent("TouchEvent");touch_device=!0}catch(ex){touch_device=!1}
8var div_class=target.getAttribute('data-he-class')||'';var div_style=target.getAttribute('data-he-style')||'';var div_background_color=target.getAttribute('data-background-color')||'';var div_text_color=target.getAttribute('data-text-color')||'';var div_alignment=target.getAttribute('data-alignment')||'';var div_button_label=target.getAttribute('data-button-label')||'';var targetdiv=document.createElement('div');targetdiv.id='he-webplugin-'+widid;targetdiv.className=div_class;targetdiv.style.cssText=div_style;if(!embedonly&&!fixedonly&&(buttononly||(touch_device&&window.outerWidth<=720))){target.parentNode.insertBefore(targetdiv,target);var button_text=target.getAttribute('data-he-text')||'';var button_class=target.getAttribute('data-he-button-class')||'';var button_style=target.getAttribute('data-he-button-style')||'';var button;if(button_text){button=document.createElement('a');button.id=iframeModalAnchorIdPrefix+widid;button.href=practice_url;button.innerHTML=button_text;button.className=button_class;button.style.cssText=button_style}else{if(!button_style.match(/display/)){button_style+=';display:inline-block;'}
9if(!button_style.match(/line-height/)){button_style+=';line-height:0;'}
10if(!button_style.match(/text-decoration/)){button_style+=';text-decoration:none;'}
11var imgfile=target.getAttribute('data-he-img')||'HE_BOOKNOW_NEWBRAND_1.png';if(!imgfile.match(/(\/|https?:\/\/)/i)){imgfile=he_url+'/images/widget/'+imgfile}
12var image=document.createElement('img');image.alt='Book now with Healthengine';image.src=imgfile;button=document.createElement('a');button.id=iframeModalAnchorIdPrefix+widid;button.className=button_class;button.href=practice_url;button.style.border='none';button.style.cssText=button_style;button.style.cursor='pointer';button.appendChild(image)}
13button.onclick=function(e){e.preventDefault();e.stopPropagation();if(touch_device&&window.outerWidth<=720){openWebpluginInNewWindowForMobile(widid,widget_url)}else{if(!he_popup_exists(widid)){he_init_popup(widid,touch_device,widget_url)}else{he_show_popup(widid,widdocid)}}
14return!1};targetdiv.appendChild(button)}else if(!embedonly&&!buttononly&&fixedonly){let staticwidget=document.createElement('a');staticwidget.id=iframeModalAnchorIdPrefix+widid;staticwidget.className='he-book he-widget-container';staticwidget.href=practice_url;if(div_background_color!=''){var widget_background_color=div_background_color}else{var widget_background_color="#2c4c59"}
15if(div_text_color!=''){var widget_text_color=div_text_color}else{var widget_text_color="#FFF";if(isHexColor(widget_background_color)){var rgb=hexToRGB(widget_background_color);
15if(isLightBackground(rgb.r,rgb.g,rgb.b)){widget_text_color="#000"}}
16if(isRGBColor(widget_background_color)){var rgb=widget_background_color.replace(/[^\d,]/g,'').split(',');if(isLightBackground(rgb[0],rgb[1],rgb[2])){widget_text_color="#000"}}}
17if(div_alignment!=''){var widget_alignment=div_alignment}else{var widget_alignment='right'}
18if(div_button_label!=''){var widget_button_label=div_button_label}else{var widget_button_label='Book appointment'}
19staticwidget.innerHTML='<style type="text/css">.he-popup{transition:all 0.2s ease;visibility:hidden;opacity:0;display:none;}.he-popup.visible{visibility:visible;opacity:1.0}.he-frame-container{transition:all 0.2s ease;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}.he-popup.visible .he-frame-container{transition:all 0.2s ease;-webkit-transform:translateY(-0px);-moz-transform:translateY(-0px);-ms-transform:translateY(-0px);-o-transform:translateY(-0px)}.he-row h2{clear: unset;float: left;font-size: 18px;user-select: none;font-weight: 400;padding: 0 !important;margin: 7px 10px !important;line-height: 1;font-family: Arial, Helvetica, sans-serif;color: '+widget_text_color+';}#he-calendar-icon{transition:all 0.2s ease;width:28px;height:28px;float:left;opacity:0.4;margin-top:2px;margin-left:10px}.he-widget-container:hover #he-calendar-icon{opacity:0.7 !important}.he-widget-container{color:'+widget_text_color+';opacity:1;box-shadow:0 10px 20px rgba(0, 0, 0, 0.5);transition:all 0.2s ease;position:fixed;bottom:-20px;'+widget_alignment+':15px;width:280px;height:110px;overflow:hidden;visibility:visible;border-radius:5px 5px 0px 0px;background:'+widget_background_color+';cursor:pointer;border:0px;z-index:9998;box-sizing:border-box;font-family:"Source Sans Pro",sans-serif;  transition: all 0.2s ease;-webkit-transform: translateY(-0px);-moz-transform: translateY(-0px);-ms-transform: translateY(-0px);-o-transform: translateY(-0px);} .he-widget-container.active{transition: all 0.2s ease;-webkit-transform: translateY(40px);-moz-transform: translateY(40px);-ms-transform: translateY(40px);-o-transform: translateY(40px);opacity:0;}.he-widget-container:hover{}#he-poweredby-container{width:100%;height:50px;padding-top:8px;background-color:rgba(0,0,0,0.1);}#he-poweredby-img{float:left;width:94px;height:19px;margin-left:7px}#he-poweredby-text{float:left;font-size:14px;font-weight:100;margin-left:25px;opacity:0.9}@media (max-width: 600px){.he-widget-container{width:100% !important;right:0px !important; left:0px !important; border-radius:0px !important}.he-widget-container:hover{}}</style><div class="he-row" style="margin: 15px;margin-bottom: 10px;"> <img alt="Book now with Healthengine" id="he-calendar-icon" src="'+he_url+'/images/widget/calendar.png"><h2>'+widget_button_label+'</h2><div style="clear: both;"></div></div><div class="he-row" id="he-poweredby-container"><div id="he-poweredby-text"> Powered By</div><img alt="Healthengine logo" id="he-poweredby-img" src="https://images.healthengine.com.au/public/images/he-logo-white_20210818061515.svg?auto=compress"><div style="clear: both;"></div></div>';document.getElementsByTagName('body')[0].appendChild(staticwidget);staticwidget.onclick=function(e){e.preventDefault();e.stopPropagation();if(touch_device&&window.outerWidth<=720){openWebpluginInNewWindowForMobile(widid,widget_url)}else{staticwidget.classList.add('active');if(!he_popup_exists(widid)){he_init_popup(widid,touch_device,widget_url)}else{he_show_popup(widid,widdocid)}}
20return!1};document.getElementsByTagName('body')[0].appendChild(staticwidget)}else{const widgetPreviewNode=document.getElementById('widget_preview');if(widgetPreviewNode){while(widgetPreviewNode.firstChild){widgetPreviewNode.firstChild.remove()}
21widgetPreviewNode.appendChild(targetdiv)}else{target.parentNode.insertBefore(targetdiv,target)}
22let practiceProfileAnchor=buildPracticeProfileLinkAnchor(widid,practice_url);targetdiv.appendChild(practiceProfileAnchor);let placeholderIframe=buildEmbedWebpluginPlaceholderHtml(widid,target);targetdiv.insertBefore(placeholderIframe,practiceProfileAnchor);if(widgetPreviewNode){injectIframeForEmbed(widid,targetdiv,target,widget_url,practiceProfileAnchor,placeholderIframe)}else{injectIframeForEmbedWithGoogleLinker(widid,targetdiv,target,widget_url,practiceProfileAnchor,placeholderIframe)}}}};function openWebpluginInNewWindowForMobile(widid,widget_url){const linkerParam=getLinkerParamForIframeAnchor(widid);if(linkerParam!==''){widget_url+='&_gl='+linkerParam}
23window.open(widget_url)}
24function injectIframeForEmbedWithGoogleLinker(widid,targetdiv,target,widget_url,practiceProfileAnchor,placeholderIframe){if(window.gtag!==undefined&&typeof window.gtag==='function'){window.gtag('event','embed_webplugin_attached',{'event_callback':function(){clearTimeout(embedIframeAtLastMoment);triggerArtificialEventToRetrieveGoogleLinkerParam(widid);injectIframeForEmbed(widid,targetdiv,target,widget_url,practiceProfileAnchor,placeholderIframe)}})}
25const embedIframeAtLastMoment=setTimeout(()=>{if(!embedIframeInjected){triggerArtificialEventToRetrieveGoogleLinkerParam(widid);injectIframeForEmbed(widid,targetdiv,target,widget_url,practiceProfileAnchor,placeholderIframe)}},maximumWaitTimeForGaEventCallback)}
26function injectIframeForEmbed(widid,targetdiv,target,widget_url,practiceProfileAnchor,placeholderIframe){if(!embedIframeInjected){const gl=getLinkerParamForPracticeProfileAnchor(widid);if(gl){widget_url+='&_gl='+gl}
27placeholderIframe.replaceWith(buildEmbedWebpluginHtml(widid,target,widget_url));embedIframeInjected=!0}}
28function triggerArtificialEventToRetrieveGoogleLinkerParam(widid){const practiceProfileAnchor=document.getElementById(profileAnchorIdPrefix+widid);if(practiceProfileAnchor){practiceProfileAnchor.dispatchEvent(new MouseEvent('mousedown',{bubbles:!0}))}}
29function buildPracticeProfileLinkAnchor(widid,practice_url){let anchorContainer=document.createElement('p');anchorContainer.style.fontSize='14px';anchorContainer.style.fontFamily='Helvetica, Arial, sans-serif';anchorContainer.style.marginLeft='10px';anchorContainer.style.color='#666 !important';anchorContainer.style.margin='20px 0 0 0';
29let anchor=document.createElement('a');anchor.id=profileAnchorIdPrefix+widid;anchor.textContent='healthengine.com.au';anchor.href=practice_url;anchor.style.color='#008ec7 !important';anchor.target='_blank';anchorContainer.appendChild(anchor);anchorContainer.insertAdjacentText('afterbegin','View our profile on ');return anchorContainer}
30function buildEmbedWebpluginPlaceholderHtml(widid,target){let width=target.getAttribute('data-he-width')||'100%';let height=target.getAttribute('data-he-height')||'500';let extraCss=target.getAttribute('data-he-frame-css')||'border: 2px solid #045475';let iframePlaceholder=document.createElement('div');iframePlaceholder.id='he-embed-'+widid;iframePlaceholder.className='he-webplugin';iframePlaceholder.name='open-appointments-widget-'+widid;iframePlaceholder.style.border='none';iframePlaceholder.setAttribute('style','width: '+width+';'+' height: '+height+'px; '+extraCss);return iframePlaceholder}
31function buildEmbedWebpluginHtml(widid,target,widget_url){let width=target.getAttribute('data-he-width')||'100%';let height=target.getAttribute('data-he-height')||'500';let extraCss=target.getAttribute('data-he-frame-css')||'border: 2px solid #045475';let embedIframe=document.createElement('iframe');embedIframe.id='he-embed-'+widid;embedIframe.src=encodeURI(widget_url);embedIframe.width=width;embedIframe.height=height+'px';embedIframe.className='he-webplugin';embedIframe.name='open-appointments-widget-'+widid;embedIframe.style.border='none';embedIframe.setAttribute('style',extraCss);return embedIframe}
32var he_popup_exists=function(widid){var popup=document.getElementById('he-webplugin-popup-'+widid);if(!popup){return!1}else{return!0}}
33var he_init_popup=function(widid,touch_device,widget_url){popup=document.createElement('div');popup.id='he-webplugin-popup-'+widid;popup.style.position="fixed";popup.style.zIndex="9999";popup.style.width="100%";popup.style.height="100%";popup.style.textAlign="center";popup.style.top="0";popup.style.left="0";popup.classList.add('he-popup','visible');popup.style.backgroundColor="rgba(0,0,0,0.6)";const linkerParam=getLinkerParamForIframeAnchor(widid);if(linkerParam!==''){widget_url+='&_gl='+linkerParam}
34popup.onclick=function(){he_hide_popup(popup)};popup.innerHTML='<style type="text/css"> .he-popup{ transition: all 0.2s ease; visibility:hidden;opacity:0;display: block;} .he-popup.visible{visibility: visible;opacity:1.0;} .he-frame-container{transition: all 0.2s ease;-webkit-transform: translateY(-40px);-moz-transform: translateY(-40px);-ms-transform: translateY(-40px);-o-transform: translateY(-40px); transform: translateY(-40px); } .he-popup.visible .he-frame-container{transition: all 0.2s ease;-webkit-transform: translateY(-0px);-moz-transform: translateY(-0px);-ms-transform: translateY(-0px);-o-transform: translateY(-0px); transform: translateY(-0px);}</style>'+'<div style="height: 10%;"></div>'+'<div class="he-frame-container" style="margin: 0 auto; width: '+(window.outerWidth<=720?'100%':'80%')+';max-width: 1080px; height: 80%; filter: none; border-radius: 24px; -webkit-mask-image: -webkit-linear-gradient(#fff, #fff); mask-image: linear-gradient(#fff, #fff);'+(touch_device?' overflow: auto; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); -webkit-overflow-scrolling: touch':' overflow: hidden')+'">'+'<iframe width="100%" height="100%" src="'+encodeURI(widget_url)+'" name="open-appointments-widget-'+widid+'" style="box-sizing: border-box; -webkit-box-sizing: border-box; border-radius: 24px; border: none; background: white;"></iframe></div>';popup.getElementsByTagName('iframe')[0].onclick=function(e){if(!e)e=window.event;e.cancelBubble=!0;if(e.stopPropagation)e.stopPropagation()};if(touch_device){try{popup.addEventListener('touchmove',function(e){e.stopPropagation();e.preventDefault()},!1)}catch(ex){}}
35document.getElementsByTagName('body')[0].appendChild(popup)}
36var he_hide_popup=function(popup){popup.classList.remove('visible');window.setTimeout(function(){popup.style.display='none'},300)
37if(document.getElementsByClassName('he-widget-container')[0]){document.getElementsByClassName('he-widget-container')[0].classList.remove('active')}}
38var he_show_popup=function(widid,widdocid){if(widdocid>0){frames['open-appointments-widget-'+widid].postMessage('changePractitioner:'+widdocid,he_url)}
39popup=document.getElementById('he-webplugin-popup-'+widid);if(popup){popup.style.display='block';window.setTimeout(function(){popup.classList.add('visible')},100)}
40return}
41var readyStateCheckInterval=setInterval(function(){if(document.readyState==="complete"){clearInterval(readyStateCheckInterval);if(script){widget_setup(script)}else{var scripts=(document.body||document).getElementsByTagName("script");for(var c=0,len=scripts.length;c<len;c++){widget_setup(scripts[c])}}}},100);var isHexColor=function(hex){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex)};var isRGBColor=function(color){return/(^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$)/i.test(color)};var hexToRGB=function(hex){hex=hex.replace(/^#+/i,'');if(hex.length==3){hex=convertTripletHexToFullHex(hex)}
42var r=parseInt(hex.substring(0,2),16);var g=parseInt(hex.substring(2,4),16);var b=parseInt(hex.substring(4,6),16);return{r:r,g:g,b:b}};var convertTripletHexToFullHex=function(hex){return hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]};
42var isLightBackground=function(r,g,b){return getContrast(r,g,b)>125};var getContrast=function(r,g,b){return((parseInt(r)*299)+(parseInt(g)*587)+(parseInt(b)*114))/1000}})()

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.