Minor refactoring
This commit is contained in:
parent
57ec8ac956
commit
1c4ea56865
3 changed files with 4 additions and 8 deletions
|
@ -1,7 +1,4 @@
|
||||||
import { browser } from "webextension-polyfill-ts";
|
import { browser } from "webextension-polyfill-ts";
|
||||||
declare interface Window {
|
|
||||||
hasRun: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
if (window.location.host != "translate.google.com" || window.hasRun) return;
|
if (window.location.host != "translate.google.com" || window.hasRun) return;
|
||||||
|
|
|
@ -4,11 +4,6 @@ import App from "./Translate.svelte";
|
||||||
import "tippy.js/dist/tippy.css";
|
import "tippy.js/dist/tippy.css";
|
||||||
import "./tippy.scss";
|
import "./tippy.scss";
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
hasRun: any;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
(() => {
|
(() => {
|
||||||
//Make sure our script only runs once
|
//Make sure our script only runs once
|
||||||
if (window.hasRun) return;
|
if (window.hasRun) return;
|
||||||
|
|
4
src/types.d.ts
vendored
4
src/types.d.ts
vendored
|
@ -15,3 +15,7 @@ declare interface Flashcard {
|
||||||
dateAdded: Date;
|
dateAdded: Date;
|
||||||
exported: boolean;
|
exported: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare interface Window {
|
||||||
|
hasRun: any;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue