Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
discord no longer hovering over UserBanner
Browse files Browse the repository at this point in the history
  • Loading branch information
userXinos committed Sep 9, 2022
1 parent 9f6b1db commit e4ec378
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions modules/Patcher/General.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = class General {
this.isModalOpen = false;
return this.overlayCallback(...args, () => this.isModalOpen = true);
});
this.injectWithSettings('UserBanner.default', this.initNewContextMenu.userBanner);
this.injectWithSettings('CustomStatus.default', this.initNewContextMenu.customStatus);
this.injectToGetImageSrc('image-tools-media-proxy-sizes');
this.patchOpenContextMenuLazy('image-tools-open-context-menu-lazy', {
Expand Down Expand Up @@ -320,23 +319,6 @@ module.exports = class General {
}

return {
userBanner ([ { user } ], res, settings) {
if (!res.props.onContextMenu) { // @todo else ?
if (user.banner) {
const size = { width: 2048,
height: 918 };
const images = {
png: { src: this.fixUrlSize(ImageResolve.getUserBannerURL(user, false)).replace('.webp', '.png'), ...size },
webp: { src: this.fixUrlSize(ImageResolve.getUserBannerURL(user, false)), ...size },
gif: ImageResolve.hasAnimatedUserBanner(user) ? { src: this.fixUrlSize(ImageResolve.getUserBannerURL(user, true)), ...size } : null
};

res.props.onContextMenu = (e) => genContextMenu(e, 'user-banner', { images, settings });
}
}
return res;
},

customStatus (args, res, settings) {
if (!res.props.onContextMenu) { // @todo else ?
res.props.onContextMenu = (event) => {
Expand Down

0 comments on commit e4ec378

Please sign in to comment.