diff --git a/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js b/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js index 19dbdf42fc..54d75aa303 100644 --- a/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js +++ b/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js @@ -3,7 +3,7 @@ class BadgesEverywhere { getName () {return "BadgesEverywhere";} - getVersion () {return "1.2.6";} + getVersion () {return "1.2.7";} getAuthor () {return "DevilBro";} @@ -11,7 +11,7 @@ class BadgesEverywhere { initConstructor () { this.changelog = { - "improved":[["Nitro","Nitro badge now shows the subscription date instead of the name (can be turned off)"]] + "added":[["Guild Boost","Now shows the Guild Boost badge for people who boosted on the current server and also shows the actual tier in the member list instead of the general boost badge"]] }; this.patchModules = { @@ -19,6 +19,8 @@ class BadgesEverywhere { "MessageUsername":"componentDidMount", "StandardSidebarView":"componentWillUnmount" }; + + this.chatBoostBadge = ``; this.css = ` .BE-badge { @@ -32,6 +34,9 @@ class BadgesEverywhere { .BE-badge.BE-badge-chat { margin-bottom: -3px !important; } + .BE-badge.BE-badge-list { + margin-bottom: -2px !important; + } .BE-badge.BE-badge-popout { margin-bottom: -2px !important; } @@ -50,7 +55,11 @@ class BadgesEverywhere { .BE-badge.BE-badge-HypeSquadBalance {width:17px !important; min-width:17px !important;} .BE-badge.BE-badge-EarlySupporter {width:24px !important; min-width:24px !important;} .BE-badge.BE-badge-Nitro {width:21px !important; min-width:21px !important;} - .BE-badge.BE-badge-settings {width:30px !important; min-width:30px !important;}`; + .BE-badge.BE-badge-GuildSubscription {width:17px !important; min-width:17px !important;} + .BE-badge.BE-badge-settings {width:30px !important; min-width:30px !important;} + + + ${BDFDB.dotCNS.member + BDFDB.dotCN.memberpremiumicon} {display: none;}`; this.requestedusers = {}; @@ -65,22 +74,26 @@ class BadgesEverywhere { showNitroDate: {value:true, description:"Show the subscription date for Nitro Badges"} }, badges: { - "STAFF1": {value:true, name:"Staff", selector:"profileBadgeStaff"}, - "PARTNER": {value:true, name:"Partner", selector:"profileBadgePartner"}, - "HYPESQUAD": {value:true, name:"HypeSquad", selector:"profileBadgeHypesquad"}, - "BUG_HUNTER": {value:true, name:"BugHunter", selector:"profileBadgeBugHunter"}, - "MFA_SMS": {value:false, name:"MFASMS", selector:false}, - "PREMIUM_PROMO_DISMISSED": {value:false, name:"PROMODISMISSED", selector:false}, - "HYPESQUAD_ONLINE_HOUSE_1": {value:true, name:"HypeSquad Bravery", selector:"profileBadgeHypeSquadOnlineHouse1"}, - "HYPESQUAD_ONLINE_HOUSE_2": {value:true, name:"HypeSquad Brilliance", selector:"profileBadgeHypeSquadOnlineHouse2"}, - "HYPESQUAD_ONLINE_HOUSE_3": {value:true, name:"HypeSquad Balance", selector:"profileBadgeHypeSquadOnlineHouse3"}, - "PREMIUM_EARLY_SUPPORTER": {value:true, name:"Early Supporter", selector:"profileBadgeEarlySupporter"}, - "NITRO": {value:true, name:"Nitro", selector:"profileBadgePremium"} + "STAFF": {value:true, name:"STAFF_BADGE_TOOLTIP", selector:"profileBadgeStaff"}, + "PARTNER": {value:true, name:"PARTNER_BADGE_TOOLTIP", selector:"profileBadgePartner"}, + "HYPESQUAD": {value:true, name:"HYPESQUAD_BADGE_TOOLTIP", selector:"profileBadgeHypesquad"}, + "BUG_HUNTER": {value:true, name:"BUG_HUNTER_BADGE_TOOLTIP", selector:"profileBadgeBugHunter"}, + "MFA_SMS": {value:false, name:null, selector:false}, + "PREMIUM_PROMO_DISMISSED": {value:false, name:null, selector:false}, + "HYPESQUAD_ONLINE_HOUSE_1": {value:true, name:"HypeSquad Bravery", selector:"profileBadgeHypeSquadOnlineHouse1"}, + "HYPESQUAD_ONLINE_HOUSE_2": {value:true, name:"HypeSquad Brilliance", selector:"profileBadgeHypeSquadOnlineHouse2"}, + "HYPESQUAD_ONLINE_HOUSE_3": {value:true, name:"HypeSquad Balance", selector:"profileBadgeHypeSquadOnlineHouse3"}, + "PREMIUM_EARLY_SUPPORTER": {value:true, name:"EARLY_SUPPORTER_TOOLTIP", selector:"profileBadgeEarlySupporter"}, + "NITRO": {value:true, name:"Nitro", selector:"profileBadgePremium"} + }, + boosts: { + "GUILD": {value:true, name:"Nitro Guild Boost", selector:"profileGuildSubscriberlvl", types:[1,2,3,4]}, } }; var UserFlags = BDFDB.WebModules.findByProperties("UserFlags").UserFlags; for (let flagname in UserFlags) if (this.defaults.badges[flagname]) { + if (BDFDB.LanguageStringsCheck[this.defaults.badges[flagname].name]) this.defaults.badges[flagname].name = BDFDB.LanguageStrings[this.defaults.badges[flagname].name]; this.defaults.badges[UserFlags[flagname]] = this.defaults.badges[flagname]; delete this.defaults.badges[flagname]; } @@ -92,8 +105,9 @@ class BadgesEverywhere { getSettingsPanel () { if (!global.BDFDB || typeof BDFDB != "object" || !BDFDB.loaded || !this.started) return; - var settings = BDFDB.getAllData(this, "settings"); - var badges = BDFDB.getAllData(this, "badges"); + var settings = BDFDB.getAllData(this, "settings"); + var badges = BDFDB.getAllData(this, "badges"); + var boosts = BDFDB.getAllData(this, "boosts"); var settingshtml = `