MCPcopy Create free account
hub / github.com/027xiguapi/code-box / addJs

Function addJs

tools.ts:26–32  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

24}
25
26export function addJs(code) {
27 const script = document.createElement("script")
28 // const js = document.createTextNode(`(()=>{${code}})()`)
29 const js = document.createTextNode(code)
30 script.appendChild(js)
31 document.head.appendChild(script)
32}
33
34export function setIcon(active: boolean) {
35 sendToBackground({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected