PageSourceSearch

https://www.tes.com/themes/custom/tes_magazines/js/onetrust-helper.js?v=1

js tes.com collected 2026-09-24 08:29:43 UTC 1,665 bytes, 27 lines download raw bytes

1// This function is called by OneTrust after the user updates their cookie preferences.
2function OptanonWrapper() {
3  if (!window.OnetrustActiveGroups) return;
4
5  document
6    .querySelectorAll("iframe[data-src][class*='optanon-category-']")
7    .forEach(function (element) {
8      if (!!element.getAttribute("src") || !element.dataset.src) return;
9
10      const iframeDoc = element.contentDocument || element.contentWindow.document;
11      iframeDoc.open();
12      iframeDoc.write(
13        `<html><head><style>html{font-family:Arial,sans-serif;}body{margin:0;padding:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;text-align:center;flex-direction:column;font-size:16px;}button{padding:.5rem 2rem;background:transparent;border:1px solid #bdc2cd;border-radius:4px;color:#bdc2cd;font-size:1rem;cursor:pointer;transition:background-color .2s ease-out,border .2s ease-out,color .2s ease-out;font-weight:700}button:hover{background-color:#43526f}</style></head>
14            <body style="background-color:#212937;max-width:400px;margin:auto;color:#bdc2cd;font-size:1rem">
15              <div>
16                <p style="margin:0">This content is blocked because of your cookie settings. If you wish to view this content, please click the button below to manage and accept cookies.</p>
17                ${
18                  !!window.parent.OneTrust?.ToggleInfoDisplay &&
19                  `<p style="margin:1.5rem 0 0 0"><button onclick="window.parent.OneTrust?.ToggleInfoDisplay()">Manage cookie preferences</button></p>`
20                }
21              </div>
22            </body>
23          </html>`
24      );
25      iframeDoc.close();
26    });
27}

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.