diff --git a/src/background/gtranslate_content_script.ts b/src/background/gtranslate_content_script.ts index a7aaf5e..0a771e6 100644 --- a/src/background/gtranslate_content_script.ts +++ b/src/background/gtranslate_content_script.ts @@ -1,7 +1,4 @@ import { browser } from "webextension-polyfill-ts"; -declare interface Window { - hasRun: boolean; -} (async () => { if (window.location.host != "translate.google.com" || window.hasRun) return; diff --git a/src/frontend/content_script/content_script.ts b/src/frontend/content_script/content_script.ts index ea1f605..ff714f5 100644 --- a/src/frontend/content_script/content_script.ts +++ b/src/frontend/content_script/content_script.ts @@ -4,11 +4,6 @@ import App from "./Translate.svelte"; import "tippy.js/dist/tippy.css"; import "./tippy.scss"; -declare global { - interface Window { - hasRun: any; - } -} (() => { //Make sure our script only runs once if (window.hasRun) return; diff --git a/src/types.d.ts b/src/types.d.ts index e1ec848..067ece3 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -15,3 +15,7 @@ declare interface Flashcard { dateAdded: Date; exported: boolean; } + +declare interface Window { + hasRun: any; +}