//test //end Skip to main content

</body> 5/13/2025

//catalog search test begin
<script>
document.addEventListener('DOMContentLoaded', function() {
  // 1) Grab your secondary‐nav container by the full JS path
  var navContainer = document.querySelector(
    "body > div.amplify-container.amplify-container-header.amplify-target-locator > \
     div:nth-child(2) > div:nth-child(1) > header > div > nav > div.secondary-container > div"
  );
  if (!navContainer) {
    console.warn('Catalog-search container not found.');
    return;
  }

  // 2) Build the catalog‐search form
  var catalogForm = document.createElement('form');
  catalogForm.action    = "https://oglesby-prcat.na2.iiivega.com/search";
  catalogForm.target    = "_blank";
  catalogForm.className = "catalog-search-form";
  catalogForm.style.marginTop = "0.5rem";  // a little breathing room
  catalogForm.innerHTML = `
    <div style="display: flex; align-items: center; gap: 0.5rem;">
      <label for="catalog-search-input" style="font-size: 0.9rem; white-space: nowrap;">
        Search the Catalog:
      </label>
      <input
        type="text"
        id="catalog-search-input"
        name="query"
        placeholder="Search the Catalog"
        style="padding: 0.25rem 0.5rem; font-size: 0.9rem;"
      >
      <button
        type="submit"
        style="padding: 0.3rem 0.6rem; font-size: 0.9rem; cursor: pointer;"
      >Go</button>
    </div>
    <input type="hidden" name="searchType" value="everything">
    <input type="hidden" name="pageSize"    value="10">
  `;

  // 3) Append it under that nav container
  navContainer.appendChild(catalogForm);
});
</script>

//catalog search test end


<script>
// Select all list items containing "Agenda" text or having an href attribute with the value "Agenda"
var items = document.querySelectorAll('li');

// Iterate over each matching list item
items.forEach(function(item) {
    // Check if the inner text or href attribute is "Agenda"
    if (item.innerText.trim() === "Agenda" || item.getAttribute('href') === "Agenda") {
        // Append " & Meeting Notice" to the end
        item.innerText += " & Meeting Notice";
    }
});

</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
    // Select the specified element
    const element = document.querySelector('#page-content > div > section.poc-instances.poc-instances-main-content > div > div > article > div > aside > ul');

    // Check if the element exists
    if (element) {
        // Select all list items within the element
        const listItems = element.querySelectorAll('li');

        // Check if there are more than four list items
        if (listItems.length > 1) {
            // Loop through the list items and hide the excess
            for (let i = 1; i < listItems.length; i++) {
                listItems[i].style.display = 'none';
            }
        }
    }
});
</script>
<script>
// Get the existing button element
var originalButton = document.getElementById('engage-button');

// Create a new anchor element
var newButton = document.createElement('a');

// Set the href attribute to the new URL
newButton.href = 'https://www.daisymountainfire.org/2024-07-04-quarterly-newsletter';

// Set the text content for the new button
newButton.textContent = 'Read Quarterly Newsletter';

// Copy classes from the original button
newButton.className = originalButton.className;

// Add a unique ID to the new button
newButton.id = 'newsletter-button';

// Insert the new button before the original one
originalButton.parentNode.insertBefore(newButton, originalButton);
</script>

//leave site warning CLA
<script>
document.addEventListener("DOMContentLoaded", function () {

    // USE THIS TO CONFIGURE LINK OPENING BEHAVIOR.
    // true = load in new tab
    // false = load in same tab
    // There is an issue where when set to true, browsers will consider it a pop-up if you let it count down
    const OPEN_IN_NEW_TAB = true;

    function handleExternalLink(event) {
        event.preventDefault(); // Prevent default link behavior

        let externalUrl = this.dataset.externalHref; // Get the stored URL

        let existingModal = document.getElementById("exit-warning-modal");
        if (existingModal) existingModal.remove();

        let truncatedUrl = externalUrl.length > 30 ? externalUrl.substring(0, 30) + "..." : externalUrl;

        let modal = document.createElement("div");
        modal.id = "exit-warning-modal";
        modal.setAttribute("role", "dialog");
        modal.setAttribute("aria-labelledby", "modal-heading");
        modal.setAttribute("aria-describedby", "modal-message");
        modal.setAttribute("aria-modal", "true");
        modal.style = `
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.5); display: flex; align-items: center;
            justify-content: center; z-index: 9999;
        `;

        modal.innerHTML = `
            <div style="background: white; max-width: 500px; padding: 20px;
                border-radius: 5px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
                position: relative;">
                <h2 id="modal-heading" style="margin-bottom: 10px;">Leaving Site:
You Are Now Leaving Our Website</h2>
                <p id="modal-message" style="font-size: 16px;">
                  Links to external, or third-party websites, are provided solely for visitors’ convenience. Following links to other sites is done so at your own risk and the owners of this website accept no liability for any linked sites or their content. <br> Any link from our site to an external website does not imply that we endorse or accept any responsibility for its use. It is important for users to take necessary precautions, especially to ensure appropriate safety from viruses, worms, trojans, and other potentially destructive items. Users should review the privacy policies of external websites and other terms of use to learn more about what, why, and how they collect and use any personally identifiable information. <br><strong>
Thank you for visiting and please come again.</strong>
                </p>
                <p id="url-preview" style="font-size: 16px; font-style: italic; color: #595959;"
                    title="${externalUrl}" aria-label="External URL preview: ${externalUrl}">
                    (${truncatedUrl})
                </p>
                <p style="font-size: 16px; font-weight: bold;">You will be redirected in <span id="countdown">10</span> seconds...</p>
                <button id="cancel-exit" style="margin-right: 10px; padding: 8px 12px; background: #ccc; color: black; border: none; cursor: pointer; border-radius: 3px;">Cancel</button>
                <button id="proceed-exit" style="padding: 8px 12px; background: #0056B3; color: white; font-weight: bold; border: none; cursor: pointer; border-radius: 3px;">Proceed</button>
            </div>
        `;

        document.body.appendChild(modal);

        modal.querySelector("#proceed-exit").focus();

        let countdown = 10;
        let countdownInterval = setInterval(function () {
            countdown--;
            document.getElementById("countdown").textContent = countdown;
            if (countdown <= 0) {
                clearInterval(countdownInterval);
                if (OPEN_IN_NEW_TAB) {
                    window.open(externalUrl, "_blank");
                } else {
                    window.location.href = externalUrl;
                }
            }
        }, 1000);

        document.getElementById("cancel-exit").addEventListener("click", function () {
            clearInterval(countdownInterval);
            modal.remove();
        });

        document.getElementById("proceed-exit").addEventListener("click", function () {
            clearInterval(countdownInterval);
            if (OPEN_IN_NEW_TAB) {
                window.open(externalUrl, "_blank");
            } else {
                window.location.href = externalUrl;
            }
        });

        window.addEventListener("focus", function () {
            if (document.visibilityState === "hidden") {
                modal.remove();
                clearInterval(countdownInterval);
            }
        });

        document.addEventListener("keydown", function (e) {
            if (e.key === "Escape") {
                modal.remove();
                clearInterval(countdownInterval);
            }
        }, { once: true });
    }

    function modifyExternalLinks() {
        let links = document.querySelectorAll("a[href]");

        links.forEach(link => {
            let href = link.getAttribute("href");

            if (
                /^https?:\/\//.test(href) &&
                !href.startsWith(window.location.origin) &&
                !link.closest(".cke_dialog") &&
                !/^javascript:/i.test(href)
            ) {
                link.dataset.externalHref = href;
                link.removeAttribute("href"); 
                link.style.cursor = "pointer"; 
                link.addEventListener("click", handleExternalLink);
            }
        });
    }
    modifyExternalLinks();
    const observer = new MutationObserver(modifyExternalLinks);
    observer.observe(document.body, { childList: true, subtree: true });
});
</script>

Join our mailing list
//kill engage //kill engage end //catalog search test begin //catalog search test end