PageSourceSearch

https://that-recsys-lab.net/system/assets/debugger/clockwork.js

js that-recsys-lab.net collected 2026-09-24 11:56:28 UTC 1,393 bytes, 37 lines download raw bytes

1/** Clockwork Debugger JS **/
2document.addEventListener("DOMContentLoaded", function () {
3    // Directly select the script tag by its id
4    var currentScript = document.getElementById('clockwork-script');
5
6    if (!currentScript) {
7        console.error("Clockwork Debugger: Script tag with id 'clockwork-script' not found.");
8        return;
9    }
10
11    var route = currentScript.getAttribute('data-route') || '/clockwork'; // Default route if not specified
12
13    // Debugging: Log the route to verify
14    console.log("Clockwork Debugger Route:", route);
15
16    // Create the badge container
17    var badge = document.createElement("div");
18    badge.className = "clockwork-badge";
19    badge.setAttribute('aria-label', 'Clockwork Debugger Enabled');
20    badge.setAttribute('role', 'button');
21
22    // Create the icon element
23    var icon = document.createElement("i");
24    badge.appendChild(icon);
25
26    // Create the tooltip element
27    var tooltip = document.createElement("div");
28    tooltip.className = "tooltip";
29    tooltip.innerHTML = `
30        <b>Grav Clockwork Debugger Enabled.</b><br>
31        Install the <b>Clockwork Browser extension</b> (Chrome or Firefox) or use the <b>"Clockwork Web"</b> Grav plugin to <a href="${route}" target="_blank">View Debug Info 🔗</a>.
32    `;
33    badge.appendChild(tooltip);
34
35    // Append the badge to the body
36    document.body.appendChild(badge);
37});

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.