diff --git a/src/renderer/constants.ts b/src/renderer/constants.ts index ac61ee8..e69de29 100644 --- a/src/renderer/constants.ts +++ b/src/renderer/constants.ts @@ -1 +0,0 @@ -export const localStorage = window.localStorage; diff --git a/src/renderer/fixes.ts b/src/renderer/fixes.ts index b27aab2..1b48907 100644 --- a/src/renderer/fixes.ts +++ b/src/renderer/fixes.ts @@ -1,11 +1,11 @@ import "./hideGarbage.css"; -import { isFirstRun } from "./utilts"; +import { isFirstRun } from "./utils"; // Make clicking Notifications focus the window const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!; Object.defineProperty(Notification.prototype, "onclick", { set(onClick) { - originalSetOnClick.call(this, function () { + originalSetOnClick.call(this, function (this: unknown) { onClick.apply(this, arguments); VencordDesktop.win.focus(); }); @@ -13,6 +13,7 @@ Object.defineProperty(Notification.prototype, "onclick", { configurable: true }); +// Enable Desktop Notifications by default if (isFirstRun) { Vencord.Webpack.waitFor("setDesktopType", m => { m.setDesktopType("all"); diff --git a/src/renderer/utilts.ts b/src/renderer/utils.ts similarity index 100% rename from src/renderer/utilts.ts rename to src/renderer/utils.ts diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..ccad342 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "lib": ["DOM", "DOM.Iterable", "esnext", "esnext.array", "esnext.asynciterable", "esnext.symbol"], + "module": "commonjs", + "moduleResolution": "node", + "strict": true, + "noImplicitAny": false, + "target": "ESNEXT", + "jsx": "preserve", + + "baseUrl": "./src/" + }, + "include": ["src/**/*"] +}