PageSourceSearch

https://www.the-mtc.org/scripts/reciteme.js

js the-mtc.org collected 2026-10-02 03:39:13 UTC 4,398 bytes, 149 lines download raw bytes

1var serviceUrl = "//api.reciteme.com/asset/js?v=3.3.12parser&key=";
2var serviceKey = "ef6703162ea334184dc8abd28dec75af1f3e3620";
3var options = {
4  parser: "js",
5  Style: {
6    wrapElements: false,
7  },
8  PlayerControls: {
9    Tooltip: {
10      highlightSelected: true,
11    },
12  },
13}; // Options can be added as needed
14var autoLoad = false;
15var enableFragment = "#reciteEnable";
16var loaded = [],
17  frag = !1;
18window.location.hash === enableFragment && (frag = !0);
19function loadScript(c, b) {
20  var a = document.createElement("script");
21  a.type = "text/javascript";
22  a.readyState
23    ? (a.onreadystatechange = function () {
24        if ("loaded" == a.readyState || "complete" == a.readyState)
25          (a.onreadystatechange = null), void 0 != b && b();
26      })
27    : void 0 != b &&
28      (a.onload = function () {
29        b();
30      });
31  a.src = c;
32  document.getElementsByTagName("head")[0].appendChild(a);
33}
34function _rc(c) {
35  c += "=";
36  for (var b = document.cookie.split(";"), a = 0; a < b.length; a++) {
37    for (var d = b[a]; " " == d.charAt(0); ) d = d.substring(1, d.length);
38    if (0 == d.indexOf(c)) return d.substring(c.length, d.length);
39  }
40  return null;
41}
42function loadService(c) {
43  for (var b = serviceUrl + serviceKey, a = 0; a < loaded.length; a++) if (loaded[a] == b) return;
44  loaded.push(b);
45  loadScript(serviceUrl + serviceKey, function () {
46    "function" === typeof _reciteLoaded && _reciteLoaded();
47    "function" == typeof c && c();
48    Recite.load(options);
49    Recite.Event.subscribe("Recite:load", function () {
50      Recite.enable();
51    });
52  });
53}
54"true" == _rc("Recite.Persist") && loadService();
55if ((autoLoad && "false" != _rc("Recite.Persist")) || frag)
56  document.addEventListener
57    ? document.addEventListener("DOMContentLoaded", function (c) {
58        loadService();
59      })
60    : loadService();
61
62document.addEventListener("DOMContentLoaded", function (event) {
63  var enableReciteButton = document.getElementById("enableRecite");
64  if (enableReciteButton) {
65    enableReciteButton.addEventListener("click", function () {
66      loadService();
67    });
68  }
69});
70
71function _reciteLoaded() {
72  Recite.Event.subscribe("Controls:loaded", function () {
73    document.querySelectorAll(".service-col *, .h-full *").forEach(function (node) {
74      node.classList.add("recite-ignore-styles-background");
75    });
76    document.querySelector("body").style.setProperty("width", "100%", "important");
77    // close recite tool without
78    closeButton = Recite.Sizzle("#recite-close")[0];
79    closeButton.onclick = function () {
80      Recite.disable();
81    };
82  });
83}
84function _reciteReact() {
85  //work around the react issue..
86  var wrapperElement = Recite.Sizzle("#recite-wrapper")[0];
87  var bodyElement = Recite.Sizzle("body")[0];
88
89  while (wrapperElement.childNodes.length > 0) {
90    bodyElement.append(wrapperElement.childNodes[0]);
91  }
92
93  wrapperElement.setAttribute("id", "");
94  bodyElement.setAttribute("id", "recite-wrapper");
95
96  var elements = Recite.Sizzle("#recite-header *");
97  Recite.Util.each(elements, function (id, element) {
98    element.setAttribute(
99      "class",
100      element.getAttribute("class") + " recite-ignore-styles-background recite-ignore-styles-color"
101    );
102  });
103  // add event listner to listen for React change to call observer
104  window.addEventListener("popstate", Recite.Dom.Observer.observe(document.body));
105
106  // close recite tool without
107  closeButton = Recite.Sizzle("#recite-close")[0];
108  closeButton.onclick = function () {
109    Recite.disable(true);
110  };
111}
112
113document.addEventListener("DOMContentLoaded", function (event) {
114  document.querySelectorAll("#enableRecite").forEach(function (e) {
115    e.addEventListener("click", function () {
116      loadService();
117    });
118  });
119});
120
121var css =
122  `
123  #recite-modal{
124  z-index: 9999999 !important;
125  }
126  `;
127var style = document.createElement("style");
128
129if (style.styleSheet) {
130  style.styleSheet.cssText = css;
131} else {
132  style.appendChild(document.createTextNode(css));
133}
134
135document.getElementsByTagName("head")[0].appendChild(style);
136
137window.addEventListener("load", function (event) {
138  document.querySelectorAll("#enableRecite").forEach(function (e) {
139    e.addEventListener("click", function () {
140      loadService();
141    });
142  });
143});
144
145document.querySelectorAll("#enableRecite").forEach(function (e) {
146    e.addEventListener("click", function () {
147      loadService();
148    });
149});

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.