()
| 784 | } |
| 785 | |
| 786 | function refreshEmbeddedToolHrefs() { |
| 787 | // Make right-click "Open in new tab" (and the overlay button) open the *embedded* themed variant. |
| 788 | document.querySelectorAll("[data-open-tool]").forEach((el) => { |
| 789 | const key = el.getAttribute("data-open-tool"); |
| 790 | const tool = EMBEDDED_TOOLS[key]; |
| 791 | if (!tool) return; |
| 792 | el.setAttribute("href", buildEmbeddedToolUrl(tool.href)); |
| 793 | }); |
| 794 | |
| 795 | if (toolOverlayOpenNewTab && activeEmbeddedToolKey && EMBEDDED_TOOLS[activeEmbeddedToolKey]) { |
| 796 | toolOverlayOpenNewTab.href = buildEmbeddedToolUrl(EMBEDDED_TOOLS[activeEmbeddedToolKey].href); |
| 797 | } |
| 798 | } |
| 799 | |
| 800 | function getCurrentDisplayKitTheme() { |
| 801 | return document.documentElement.getAttribute("data-theme") |
no test coverage detected