forgor to add tsconfig
This commit is contained in:
parent
9d144a11be
commit
f357ee4260
4 changed files with 19 additions and 3 deletions
|
@ -1 +0,0 @@
|
||||||
export const localStorage = window.localStorage;
|
|
|
@ -1,11 +1,11 @@
|
||||||
import "./hideGarbage.css";
|
import "./hideGarbage.css";
|
||||||
import { isFirstRun } from "./utilts";
|
import { isFirstRun } from "./utils";
|
||||||
|
|
||||||
// Make clicking Notifications focus the window
|
// Make clicking Notifications focus the window
|
||||||
const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!;
|
const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!;
|
||||||
Object.defineProperty(Notification.prototype, "onclick", {
|
Object.defineProperty(Notification.prototype, "onclick", {
|
||||||
set(onClick) {
|
set(onClick) {
|
||||||
originalSetOnClick.call(this, function () {
|
originalSetOnClick.call(this, function (this: unknown) {
|
||||||
onClick.apply(this, arguments);
|
onClick.apply(this, arguments);
|
||||||
VencordDesktop.win.focus();
|
VencordDesktop.win.focus();
|
||||||
});
|
});
|
||||||
|
@ -13,6 +13,7 @@ Object.defineProperty(Notification.prototype, "onclick", {
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Enable Desktop Notifications by default
|
||||||
if (isFirstRun) {
|
if (isFirstRun) {
|
||||||
Vencord.Webpack.waitFor("setDesktopType", m => {
|
Vencord.Webpack.waitFor("setDesktopType", m => {
|
||||||
m.setDesktopType("all");
|
m.setDesktopType("all");
|
||||||
|
|
16
tsconfig.json
Normal file
16
tsconfig.json
Normal file
|
@ -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/**/*"]
|
||||||
|
}
|
Loading…
Reference in a new issue