MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / refreshEmbeddedToolHrefs

Function refreshEmbeddedToolHrefs

app.js:786–798  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

784}
785
786function 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
800function getCurrentDisplayKitTheme() {
801 return document.documentElement.getAttribute("data-theme")

Callers 2

app.jsFile · 0.85
setThemeFunction · 0.85

Calls 1

buildEmbeddedToolUrlFunction · 0.85

Tested by

no test coverage detected