diff --git a/package-lock.json b/package-lock.json index cebf36c..cd28852 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "aibrow", - "version": "1.1.4", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "aibrow", - "version": "1.1.4", + "version": "1.2.0", "hasInstallScript": true, "license": "MPL-2.0", "dependencies": { diff --git a/package.json b/package.json index 94bc510..c0f6c6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aibrow", - "version": "1.1.4", + "version": "1.2.0", "type": "module", "scripts": { "postinstall": "node ./build/generate_eslint.js && patch-package", diff --git a/src/extension/contentscript-main/index.ts b/src/extension/contentscript-main/index.ts index 64b8a0f..afd884c 100644 --- a/src/extension/contentscript-main/index.ts +++ b/src/extension/contentscript-main/index.ts @@ -1,7 +1,8 @@ import AI from './AI' import Translation from './Translation' -const ai = new AI(window.ai) +export const ai = new AI(window.ai) +export const translation = new Translation(ai) if (process.env.BROWSER !== 'extlib') { const genericWindow = window as any @@ -9,7 +10,7 @@ if (process.env.BROWSER !== 'extlib') { genericWindow.ai = ai } if (!genericWindow.translation) { - genericWindow.translation = new Translation(ai) + genericWindow.translation = translation } genericWindow.aibrow = ai }