PageSourceSearch

https://electricalsuppliesaustralia.com.au/wp-content/plugins/esag…/assets/js/elevenlabs-context.js?ver=0.2.36

js electricalsuppliesaustralia.com.au collected 2026-10-08 19:55:02 UTC 1,524 bytes, 55 lines download raw bytes

1(function () {
2  'use strict';
3
4  var source = window.ESAGElevenLabsPageContext || {};
5  var supplied = source.dynamicVariables || {};
6
7  function applyContext(widget) {
8    if (!widget || typeof widget.setAttribute !== 'function') return;
9
10    var merged = {};
11    var existing = widget.getAttribute('dynamic-variables');
12    if (existing) {
13      try {
14        merged = JSON.parse(existing) || {};
15      } catch (error) {
16        merged = {};
17      }
18    }
19
20    Object.keys(supplied).forEach(function (key) {
21      merged[key] = supplied[key];
22    });
23
24    widget.setAttribute('dynamic-variables', JSON.stringify(merged));
25    widget.setAttribute('data-esag-page-context', 'ready');
26  }
27
28  function applyWithin(root) {
29    if (!root) return;
30    if (root.matches && root.matches('elevenlabs-convai')) {
31      applyContext(root);
32    }
33    if (root.querySelectorAll) {
34      Array.prototype.forEach.call(root.querySelectorAll('elevenlabs-convai'), applyContext);
35    }
36  }
37
38  function start() {
39    applyWithin(document);
40
41    if (!window.MutationObserver || !document.documentElement) return;
42    var observer = new MutationObserver(function (mutations) {
43      mutations.forEach(function (mutation) {
44        Array.prototype.forEach.call(mutation.addedNodes || [], applyWithin);
45      });
46    });
47    observer.observe(document.documentElement, { childList: true, subtree: true });
48  }
49
50  if (document.readyState === 'loading') {
51    document.addEventListener('DOMContentLoaded', start);
52  } else {
53    start();
54  }
55}());

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.