PageSourceSearch

https://www.zohoflow.com/sites/zweb/js/common/dynamicemail.js

js zohoflow.com collected 2026-09-24 18:26:51 UTC 6,979 bytes, 16 lines download raw bytes

1$(document).ready(function(){zwc_setSupportMail(true)});$(window).on("load",function(){zwc_setSupportMail(false)});function zwc_setMailToAnchorTag(t,a){if(!t||typeof a!=="string")return;let e=t.getAttribute("href").split(":")[1];if(e!==a)this.wantToSearchInNext=false;const i=t.getAttribute("id");if(i==="zf-support-mailid"){const l=[...document.querySelectorAll(".zf-support-mail-wrap a")];const s=a.split(",");const o=t.closest(".zw-support-mail-links");if(s?.length>1&&!o?.classList.contains("zf-multi-support-mail")){o?.classList.add("zf-multi-support-mail")}if(o?.classList.contains("zf-multi-support-mail")){if(l.length===s.length){l.forEach((t,a)=>updateMailto(t,s[a]))}else{adjustMailLinks(l,s)}}else{updateMailto(t,a)}}else{updateMailto(t,a)}}function updateMailto(t,a){if(!t)return;let e=`mailto:${a}`;const i=t.getAttribute("href");if(i.includes("?")){e+=`?${i.split("?")[1]}`}t.setAttribute("href",e);t.setAttribute("aria-label",e);if(t.textContent.includes("@")){this.wantToSearchInNext=false;t.textContent=a.split("?")[0]}if(t.textContent.includes("[at]")){this.wantToSearchInNext=false;t.textContent=zwc_maskEmail(a.split("?")[0]);t.classList.remove("zf-support-id-large","zf-support-id-medium","zf-support-id-small");t.classList.add(zwc_getLengthLabel(a.split("?")[0]));t.setAttribute("aria-label",`Send an email to ${zwc_maskEmail(a.split("?")[0])}`)}}function adjustMailLinks(i,t){const l=document.querySelector(".zw-support-mail-links .zf-support-mail-wrap");const a=document.querySelector(".zw-support-mail-links.zf-multi-support-mail");t.forEach((t,a)=>{if(i[a]){updateMailto(i[a],t)}else{const e=i[0].cloneNode(true);
1e.setAttribute("id",`zf-support-mailid-${i.length}`);updateMailto(e,t);l.appendChild(e)}});i.slice(t.length).forEach(t=>t.remove());a.classList.toggle("zf-multi-support-mail",t.length>1)}function zwc_folderMailCase(a,t){const e=t.Folder;if(this.wantToSearchInNext&&e){const i=Object.keys(e).find(t=>{if(window.location.pathname.includes(t)){return t}});if(i){let t=e[i];zwc_setMailToAnchorTag.call(this,a,t)}}}function zwc_langMailCase(t,a){const e=a.Language||{};const i=Object.keys(e).includes(currentUrlLang);const l=i&&e[currentUrlLang];if(this.wantToSearchInNext&&l)zwc_setMailToAnchorTag.call(this,t,l)}function zwc_countryMailCase(t,a){const e=a.Country||{};const i=Object.keys(e).includes(CountryCode);const l=i&&e[CountryCode];if(this.wantToSearchInNext&&l)zwc_setMailToAnchorTag.call(this,t,l)}function zwc_regionMailCase(t,a){const e=a.Region||{};const i=Object.keys(e).length;if(this.wantToSearchInNext&&i){if(customvar.isEU&&e["EU"])zwc_setMailToAnchorTag.call(this,t,e["EU"]);if(customvar.isAPAC&&e["APAC"])zwc_setMailToAnchorTag.call(this,t,e["APAC"]);if(customvar.isMEA&&e["MEA"])zwc_setMailToAnchorTag.call(this,t,e["MEA"]);if(customvar.isLAT&&e["LAT"])zwc_setMailToAnchorTag.call(this,t,e["LAT"]);if(customvar.isANZ&&e["ANZ"])zwc_setMailToAnchorTag.call(this,t,e["ANZ"])}}function zwc_maskEmail(t){return t}function zwc_getLengthLabel(t){t=zwc_maskEmail(t);return t.length>40?"zf-support-id-large":t.length>25?"zf-support-id-medium":"zf-support-id-small"}function zwc_setFooterMail(t){let a=customvar.productName?.replace(/\s+/g,"").toLowerCase();let e=customvar.isEU?t?.footer?.EU[a]||"[email protected]":t?.footer?.Default[a]||"[email protected]";const i=e.split(",");const l=i.length;var s=`<div class="ZF-support">
2                            <div class="ZF-container ${l>1?"zf-multi-support-mail":""}">
3                               <div class="ZF-contact">
4                                    <ul>
5                                        <li class="zf-support-mail">
6                                            ${l>1?`<a aria-label="Send an email to ${zwc_maskEmail(i[0])}" id="zf-support-mailid" href="mailto:${i[0]}" class="${zwc_getLengthLabel(i[0])}">${zwc_maskEmail(i[0])}</a> <a aria-label="Send an email to ${zwc_maskEmail(i[1])}" id="zf-support-mailid-1" href="mailto:${i[1]}" class="${zwc_getLengthLabel(i[1])}">${zwc_maskEmail(i[1])}</a>`:`<a aria-label="Send an email to ${zwc_maskEmail(e)}" id="zf-support-mailid" href="mailto:${e}" class="${zwc_getLengthLabel(e)}">${zwc_maskEmail(e)}</a>`}
7                                           
8                                        </li>
9                                        <li class="zglob-lang">
10                                            <div class="ZF-dlsel">
11                                            </div>
12                                        </li>
13                                    </ul>
14                                </div>
15                            </div>
16                           </div>`;if(!customvar.newFooterProducts.includes(customvar.productName)){if(l>1){s=`<span  class="zf-support-mail-wrap"><a aria-label="Send an email to ${zwc_maskEmail(i[0])}" id="zf-support-mailid" href="mailto:${i[0]}" class="${zwc_getLengthLabel(i[0])}">${zwc_maskEmail(i[0])}</a> <a aria-label="Send an email to ${zwc_maskEmail(i[1])}" id="zf-support-mailid-1" href="mailto:${i[1]}" class="${zwc_getLengthLabel(i[1])}">${zwc_maskEmail(i[1])}</a></span>`}else{s=`<span class="zf-support-mail-wrap"><a aria-label="Send an email to ${zwc_maskEmail(e)}" id="zf-support-mailid" href="mailto:${e}" class="${zwc_getLengthLabel(e)}">${zwc_maskEmail(e)}</a></span>`}customvar.zwc_setnewFooter=function(){if($(".zw-support-mail-links").length>0){$(".zw-support-mail-links").html(s);if(l>1){$(".zw-support-mail-links").addClass("zf-multi-support-mail")}}};customvar.zwc_setnewFooter()}else{if($(".common-links").length>0){$(".common-links").prepend(s)}}}function zwc_setSupportMail(a){let t="";if(_preZ==window.location.hostname){t="https://"+_preZ+"/sites/zweb/json/dynamicemail.json"}
16else{t="https://www.zohowebstatic.com/sites/zweb/json/dynamicemail.json"}fetch(t).then(t=>t.json()).then(o=>{if(a){zwc_setFooterMail(o)}const t=document.querySelectorAll("a[href^='mailto']");t.forEach(function(t){this.wantToSearchInNext=true;let e=t.getAttribute("href").split(":")[1];const a=t.getAttribute("id");if(a=="zf-support-mailid"){if(t.parentElement.parentElement.classList.contains("zf-multi-support-mail")){e="";const s=document.querySelectorAll(".zf-support-mail-wrap a");s.forEach((t,a)=>{if(a!=0){e+=","}e=e+t.getAttribute("href").split(":")[1]})}}const i=o.runningText.find(t=>t.Default==e.split("?")[0]);const l=t.getAttribute("data-mail-filter");if(i){if(l){switch(l.toUpperCase()){case"FOLDER":zwc_folderMailCase.call(this,t,i);break;case"LANGUAGE":zwc_langMailCase.call(this,t,i);break;case"COUNTRY":zwc_countryMailCase.call(this,t,i);break;case"REGION":zwc_regionMailCase.call(this,t,i);break;default:"";break}}else{zwc_regionMailCase.call(this,t,i);zwc_folderMailCase.call(this,t,i);zwc_langMailCase.call(this,t,i);zwc_countryMailCase.call(this,t,i)}}});if(typeof customvar.zwc_customSupportMail!="undefined"){customvar.zwc_customSupportMail()}}).catch(t=>{});if(typeof customvar.zwc_customSupportMail!="undefined"){customvar.zwc_customSupportMail()}}

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.