PageSourceSearch

https://www.pumpsandsystems.com/wp-content/themes/cmg-kadence-2026/js/kadence-ajax-ads.js?ver=1790261797

js pumpsandsystems.com collected 2026-09-24 18:37:31 UTC 1,226 bytes, 29 lines download raw bytes

1(function () {
2  // After Kadence AJAX pagination replaces the post grid, re-initialize GPT slots.
3  // kb-query-loaded bubbles from the query block root after DOM replacement.
4  document.addEventListener('kb-query-loaded', function (e) {
5    if (typeof googletag === 'undefined' || !googletag.cmd) return;
6
7    // Destroy any GPT slots whose divs were removed from the DOM (old page's slots).
8    googletag.cmd.push(function () {
9      var orphans = googletag.pubads().getSlots().filter(function (slot) {
10        return !document.getElementById(slot.getSlotElementId());
11      });
12      if (orphans.length) {
13        googletag.destroySlots(orphans);
14      }
15    });
16
17    // Advanced Ads outputs inline <script> tags that call defineSlot + display.
18    // innerHTML replacement doesn't execute scripts, so re-create them as new nodes.
19    var container = e.target;
20    container.querySelectorAll('.cmg-ad-slot script').forEach(function (old) {
21      var fresh = document.createElement('script');
22      Array.from(old.attributes).forEach(function (attr) {
23        fresh.setAttribute(attr.name, attr.value);
24      });
25      fresh.textContent = old.textContent;
26      old.parentNode.replaceChild(fresh, old);
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.