diff --git a/src/injector/inject.ts b/src/injector/inject.ts index f512992..6bd6b11 100644 --- a/src/injector/inject.ts +++ b/src/injector/inject.ts @@ -491,7 +491,7 @@ export function inject (vm: ChibiCompatibleVM) { sideloadTempButton.setAttribute('text', format('chibi.sideloadTemporarily')); sideloadTempButton.setAttribute('callbackKey', 'CHIBI_SIDELOAD_FROM_FILE_TEMPORAILY'); workspace.registerButtonCallback('CHIBI_SIDELOAD_FROM_FILE_TEMPORAILY', () => { - if (prompt(format('chibi.exprimentalFileWarning'))) { + if (confirm(format('chibi.exprimentalFileWarning'))) { const input = document.createElement('input'); input.setAttribute('type', 'file'); input.setAttribute('accept', '.js'); diff --git a/src/loader/loader.ts b/src/loader/loader.ts index 7e3d86b..b4b0962 100644 --- a/src/loader/loader.ts +++ b/src/loader/loader.ts @@ -53,8 +53,12 @@ class UnsandboxedLoader { new Blob( [ ` -var Scratch = document.getElementById('chibiExtension')?.Scratch; -eval(${JSON.stringify(`${code}\n//# sourceURL=${extensionURL}`)}); +/** + * Generated by Chibi + */ +let Scratch = document.getElementById('chibiExtension')?.Scratch; +${code} +//# sourceURL=${extensionURL} ` ], { type: 'text/javascript' }