PageSourceSearch

https://cmief.ca/wp-content/themes/adnetframework/extensions/blocks/block-iframe/block-iframe.js

js cmief.ca collected 2026-10-04 02:40:07 UTC 960 bytes, 29 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2  /* IFRAME RESIZE */
3  window.addEventListener("message", function (event) {
4    var frames = document.getElementsByTagName("iframe");
5    for (var i = 0; i < frames.length; i++) {
6      if (frames[i].contentWindow === event.source) {
7        frames[i].style.height = event.data + "px";
8        break;
9      }
10    }
11  });
12
13  /* RELOAD IFRAME ON TAB CHANGE */
14  var tabs = document.querySelectorAll(".kt-tabs-title-list li a");
15  tabs.forEach(function (tab) {
16    tab.addEventListener("click", function () {
17      if (window.innerWidth < 500) {
18        var tabIndex = tab.dataset.tab;
19        var iframe = document.querySelector(
20          ".kt-tabs-content-wrap .kt-inner-tab-" + tabIndex + " iframe"
21        );
22        var src = iframe.getAttribute("src");
23        if (src !== undefined) {
24          iframe.setAttribute("src", src);
25        }
26      }
27    });
28  });
29});

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.