let yr = new Date().getFullYear(); // Current year let notices = document.querySelector(".notices"); // Footer notices // Check for promoVars let hasPV = false; if (typeof promoVars !== "undefined") { hasPV = true; } // Check for legacy vslFooterText call and display if promoVars doesn't exist var vslFooterText = (val) => { if (!hasPV) { let signoffStatement = document.createElement("span"); signoffStatement.classList.add("signoffDate"); signoffStatement.textContent = "This presentation was released in " + val + ". "; notices.append(signoffStatement); } } document.addEventListener("DOMContentLoaded", function () { // Check for footer suppression if (typeof (hideFooter) !== "undefined" && hideFooter == true) { document.querySelector(".footer_copyright").style.display = "none"; } // Display current year document.querySelector('.footP .year').textContent = yr; // Add signoffDate if exists and isn't empty/TODO, and if page type is VSL if (hasPV && promoVars.hasOwnProperty("signoffDate") && promoVars.signoffDate != "TODO SIGNOFF_DATE" && promoVars.signoffDate != "" && promoVars.hasOwnProperty("pageType") && promoVars.pageType.toLowerCase() == "vsl") { let signoffStatement = document.createElement("span"); signoffStatement.classList.add("signoffDate"); signoffStatement.textContent = "This presentation was released in " + promoVars.signoffDate + ". "; notices.append(signoffStatement); } // Add testimonials link unless showTestimonials is false if (hasPV && promoVars.hasOwnProperty("pubCode") && (promoVars.hasOwnProperty("showTestimonials") && promoVars.showTestimonials !== "hide")) { let disclaimer_note = document.createElement("span"); disclaimer_note.innerHTML = "Personal results, yours may vary. For typical results, see our Testimonial Support Page. "; notices.append(disclaimer_note); }; }); // End DOMContentLoaded