Modify Web Accessibility Statement
Placed in advanced before. Modify </body>
<script>
const observer = new MutationObserver(() => {
// Target the main paragraph in the modal
const para = document.querySelector("#website-accessibility-policy-modal > div > div > div > p");
if (para) {
// Update the text inside the paragraph by modifying the text node directly
para.childNodes.forEach(node => {
if (node.nodeType === Node.TEXT_NODE) {
node.nodeValue = node.nodeValue
.replace(/\(the "District"\)/g, '')
.replace(/As part of this commitment, the district strives/gi, 'As part of this commitment, we strive');
}
});
}
// Target the iframe inside the modal
const iframe = document.querySelector("#website-accessibility-policy-modal > div > div > div > iframe");
if (iframe && iframe.contentDocument) {
const iframeDoc = iframe.contentDocument;
// Select the p element directly under the h4:nth-child(6) in the iframe
const targetParagraph = iframeDoc.querySelector("body > h4:nth-child(6) + p");
if (targetParagraph) {
targetParagraph.childNodes.forEach(node => {
if (node.nodeType === Node.TEXT_NODE) {
node.nodeValue = node.nodeValue.replace(/\bThe District\b/g, 'DISTRICT NAME');
}
});
}
}
// Stop observing after all changes are made
observer.disconnect();
});
// Start observing the body for new elements added
observer.observe(document.body, { childList: true, subtree: true });
//new addition
const iframe = document.querySelector("#website-accessibility-policy-modal > div > div > div > iframe");
iframe.contentWindow.postMessage({ action: "replaceText", target: "The District", replacement: "CUSTOMER NAME" }, "*");
window.addEventListener("message", (event) => {
// Make sure you validate the event.origin for security
if (event.origin === "your-site-origin") {
const data = event.data;
if (data.action === "replaceText") {
const paragraphs = document.querySelectorAll("p");
paragraphs.forEach(p => {
if (p.innerHTML.includes(data.target)) {
p.innerHTML = p.innerHTML.replace(new RegExp(data.target, "g"), data.replacement);
}
});
}
}
});
</script>