This commit is contained in:
Mirco Wittrien 2021-05-27 21:33:41 +02:00
parent 4a43e1a148
commit 479367ef60
5 changed files with 11 additions and 29 deletions

View File

@ -808,7 +808,6 @@
"badgesChat": "badgesChat-f_cbR8",
"badgesInner": "inner-dA0J42",
"badgesList": "badgesList-Aw_p52",
"badgesPopout": "badgesPopout-srZ8EX",
"badgesSettings": "badgesSettings-ychoGn",
"indicator": "indicator-cY1-b4",
"indicatorInner": "indicatorInner-08W8Jl",
@ -1331,7 +1330,6 @@
"_badgeseverywherebadgeschat": ["BadgesEverywhere", "badgesChat"],
"_badgeseverywherebadgesinner": ["BadgesEverywhere", "badgesInner"],
"_badgeseverywherebadgeslist": ["BadgesEverywhere", "badgesList"],
"_badgeseverywherebadgespopout": ["BadgesEverywhere", "badgesPopout"],
"_badgeseverywherebadgessettings": ["BadgesEverywhere", "badgesSettings"],
"_badgeseverywhereindicator": ["BadgesEverywhere", "indicator"],
"_badgeseverywhereindicatorinner": ["BadgesEverywhere", "indicatorInner"],

View File

@ -2,8 +2,8 @@
* @name BadgesEverywhere
* @author DevilBro
* @authorId 278543574059057154
* @version 1.6.9
* @description Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/UserPopout
* @version 1.7.0
* @description Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
@ -17,12 +17,12 @@ module.exports = (_ => {
"info": {
"name": "BadgesEverywhere",
"author": "DevilBro",
"version": "1.6.9",
"description": "Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/UserPopout"
"version": "1.7.0",
"description": "Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList"
},
"changeLog": {
"fixed": {
"Works again": ""
"improved": {
"User Popout": "Removed all options for the User Popout since Discord added it themselves"
}
}
};
@ -75,18 +75,16 @@ module.exports = (_ => {
this.patchedModules = {
after: {
MemberListItem: "render",
MessageUsername: "default",
UserPopout: "render"
MessageUsername: "default"
}
};
this.defaults = {
general: {
useColoredVersion: {value: true, description: "Use colored Version of the Badges for Chat and Members"},
useColoredVersion: {value: true, description: "Use colored Version of the Badges"},
showNitroDate: {value: true, description: "Show the Subscription Date for Nitro/Boost Badges"}
},
places: {
popout: {value: true, description: "User Popout"},
chat: {value: true, description: "Chat"},
memberList: {value: true, description: "Member List"}
},
@ -195,9 +193,6 @@ module.exports = (_ => {
justify-content: center;
align-items: center;
}
${BDFDB.dotCN._badgeseverywherebadgespopout} {
margin-top: 6px;
}
${BDFDB.dotCN._badgeseverywherebadgeschat} {
display: inline-flex;
position: relative;
@ -440,13 +435,6 @@ module.exports = (_ => {
}
}
processUserPopout (e) {
if (e.instance.props.user && this.settings.places.popout) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "CustomStatus"});
if (index > -1) this.injectBadges(e.instance, children, e.instance.props.user, "popout", e.instance.props.activity && e.instance.props.activity.type != BDFDB.DiscordConstants.ActivityTypes.CUSTOM_STATUS);
}
}
injectBadges (instance, children, user, type, colored) {
if (!BDFDB.ArrayUtils.is(children) || !user || user.bot) return;
if (loadedUsers[user.id] && ((new Date()).getTime() - loadedUsers[user.id].date < 1000*60*60*24*7)) children.push(this.createBadges(user, type, colored));

View File

@ -12,7 +12,7 @@
[patreon-badge]: https://img.shields.io/badge/Patreon-%23F96854.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAdhwAAHYcBj+XxZQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGBSURBVFiF7Za9ThtBFEbPBUpERWMwCorfJjY4aVLxBFHCKyCl4hWQUqVMBULmbfiRCNACqSJsDsXakjHGO8Y7ovFXrmbmO3NnZ74bqrzUeUR8HPP9mdQ60AZawCZQBwK4BC6ADnAUEZeTFhmnsxLjdfVAfXhl/rB66h/1QyUAalu9TzAe1Z26NROAutvf0VvVU7+/CUD9PKP5MMT2VADqhvqvAvOB7tQ1gIXXznpEP4HlxLEpWgH2AEInX0OLv/cUWKwQAKALbKZU4EsGc4AloJ0C8CmD+UDNFIBGRoBGCkAtI8B66i3IpccUgJuMANcpAKcZAc5SAE4yAnRSAA6BXgbzLnBUChARF8DvDAC/IuIqNYzqFYfRrVqDxDCKiL/AV6o5ikdgJyJuBrsrrcBQJX44W0/QVb+NLpoM0B/f6pdwWt2qL3NlWoD+nFV1X/2fYPxg0cCOfdJL+4ESkBqwDTQpQmuNoi2/onjAOsBxRFxPWmTqClSp9w6jOcAcYA7AE1OMk5ulhBZCAAAAAElFTkSuQmCC
[patreon-link]: https://patreon.com/MircoWittrien
Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/UserPopout
Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList
Chat:
@ -21,8 +21,4 @@ Chat:
Member List:
![screenshot1](https://mwittrien.github.io/BetterDiscordAddons/Plugins/BadgesEverywhere/_res/screenshot1.png)
User Popout:
![screenshot2](https://mwittrien.github.io/BetterDiscordAddons/Plugins/BadgesEverywhere/_res/screenshot2.png)
![screenshot1](https://mwittrien.github.io/BetterDiscordAddons/Plugins/BadgesEverywhere/_res/screenshot1.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -9,7 +9,7 @@
[patreon-badge]: https://img.shields.io/badge/Patreon-%23F96854.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAdhwAAHYcBj+XxZQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGBSURBVFiF7Za9ThtBFEbPBUpERWMwCorfJjY4aVLxBFHCKyCl4hWQUqVMBULmbfiRCNACqSJsDsXakjHGO8Y7ovFXrmbmO3NnZ74bqrzUeUR8HPP9mdQ60AZawCZQBwK4BC6ADnAUEZeTFhmnsxLjdfVAfXhl/rB66h/1QyUAalu9TzAe1Z26NROAutvf0VvVU7+/CUD9PKP5MMT2VADqhvqvAvOB7tQ1gIXXznpEP4HlxLEpWgH2AEInX0OLv/cUWKwQAKALbKZU4EsGc4AloJ0C8CmD+UDNFIBGRoBGCkAtI8B66i3IpccUgJuMANcpAKcZAc5SAE4yAnRSAA6BXgbzLnBUChARF8DvDAC/IuIqNYzqFYfRrVqDxDCKiL/AV6o5ikdgJyJuBrsrrcBQJX44W0/QVb+NLpoM0B/f6pdwWt2qL3NlWoD+nFV1X/2fYPxg0cCOfdJL+4ESkBqwDTQpQmuNoi2/onjAOsBxRFxPWmTqClSp9w6jOcAcYA7AE1OMk5ulhBZCAAAAAElFTkSuQmCC
[patreon-link]: https://patreon.com/MircoWittrien
- [Badges Everywhere](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BadgesEverywhere) - Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/UserPopout
- [Badges Everywhere](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BadgesEverywhere) - Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList
- [Better Friend List](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterFriendList) - Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount
- [Better NSFW Tag](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterNsfwTag) - Adds a more noticeable Tag to NSFW Channels
- [Better Search Page](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterSearchPage) - Adds some extra Controls to the Search Results Page