Enable Desktop Notifications on first run

This commit is contained in:
Vendicated
2023-04-05 16:51:19 +02:00
parent d9f2b15e84
commit 9d144a11be
4 changed files with 18 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import "./hideGarbage.css";
import { isFirstRun } from "./utilts";
// Make clicking Notifications focus the window
const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!;
@@ -11,3 +12,9 @@ Object.defineProperty(Notification.prototype, "onclick", {
},
configurable: true
});
if (isFirstRun) {
Vencord.Webpack.waitFor("setDesktopType", m => {
m.setDesktopType("all");
});
}