PageSourceSearch

https://ibaa.ca/client_assets/js/ib-modals2.js

js ibaa.ca collected 2026-10-04 13:28:59 UTC 1,549 bytes, 51 lines download raw bytes

1// IB-Modals
2
3(function iife() {
4  "use strict";
5  function closestEl(el, selector) {
6    var doc = el.document || el.ownerDocument;
7    var matches = doc.querySelectorAll(selector);
8    var i;
9    while (el) {
10      i = matches.length - 1;
11      while (i >= 0) {
12        if (matches.item(i) === el) {
13          return el;
14        }
15        i -= 1;
16      }
17      el = el.parentElement;
18    }
19    return el;
20  }
21  var modalBtns = document.querySelectorAll(".ib-modal-button");
22  modalBtns.forEach(function addBtnClickEvent(btn) {
23    btn.onclick = function showModal() {
24      var modal = btn.getAttribute("data-modal");
25      document.getElementById(modal).style.display = "block";
26    };
27  });
28
29  var closeBtns = document.querySelectorAll(".ib-close");
30  closeBtns.forEach(function addCloseClickEvent(btn) {
31    btn.onclick = function closeModal() {
32      var modal = closestEl(btn, ".ib-modal");
33      modal.style.display = "none";
34    };
35  });
36  var speakerBio = document.querySelectorAll(".speaker-card.ib-modal-button");
37  speakerBio.forEach(function addCloseClickEvent(btn) {
38    btn.onclick = function closeModal() {
39      var modal = closestEl(btn, ".ib-modal");
40      var bioModal = btn.getAttribute("data-modal");
41      modal.style.display = "none";
42      document.getElementById(bioModal).style.display = "block";
43    };
44  });
45
46  window.onclick = function closeOnClick(event) {
47    if (event.target.className === "ib-modal") {
48      event.target.style.display = "none";
49    }
50  };
51})();

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.