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