mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-24 06:05:09 +00:00
12 lines
409 B
TypeScript
12 lines
409 B
TypeScript
|
// 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 () {
|
||
|
onClick.apply(this, arguments);
|
||
|
VencordDesktop.win.focus();
|
||
|
});
|
||
|
},
|
||
|
configurable: true
|
||
|
});
|