14 lines
438 B
TypeScript
14 lines
438 B
TypeScript
import "./hideGarbage.css";
|
|
|
|
// 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
|
|
});
|