MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / getCurrentScript

Function getCurrentScript

packages/extension/rewrite/runtime.ts:9–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const FIGMA_DELETE_PATCH_VALUE = 'window.figma = undefined'
8
9function getCurrentScript(): HTMLScriptElement | null {
10 const current = document.currentScript
11 if (!(current instanceof HTMLScriptElement) || !current.src) {
12 return null
13 }
14 return current
15}
16
17function replaceScript(current: HTMLScriptElement, src: string): void {
18 const script = document.createElement('script')

Callers 1

rewriteCurrentScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected