//META{"name":"UIMods"}*//
var UIMods = (() => {
const config = {
info: {
name: "0Mods",
authors: [{
name: "x2z"
}],
version: "0.1.0",
description: "User Interface Modifications",
},
main: "index.js",
defaultConfig: [{
type: "category",
id: "snippets",
name: "UI snippets",
collapsible: true,
shown: false,
settings: [{
type: "switch",
id: "hideGiftNitro",
name: "Hide gift nitro button",
note: "Hides the nitro gifting button in the message area.",
value: false
}, {
type: "switch",
id: "hideUnnecessaryProfile",
name: "Hide unnecessary items on user popouts",
note: "Hides unnecessary UI items such as the PROTIP or titles such as 'Roles' or 'Notes' on user popouts.",
value: false
}, {
type: "switch",
id: "squaredRoles",
name: "Squared roles",
note: "Makes roles squared in user popouts.",
value: false
}, {
type: "switch",
id: "lowerBrightnessTimestamp",
name: "Lower brightness - timestamps",
note: "Makes timestamps on messages slightly less visible, making the chat window look less cluttered.",
value: false
}, {
type: "switch",
id: "lowerBrightnessServerNotif",
name: "Lower brightness - server notification bubble",
note: "Makes the notification bubbles on the far left slightly less visible, making the server area less cluttered.",
value: false
}, {
type: "switch",
id: "hideBlocked",
name: "Hide blocked messages",
note: "Completely gets rid of all blocked messages.",
value: false
}, {
type: "switch",
id: "blurEmail",
name: "Blur Email/Phone number/Paypal email",
note: "Blurs email address/phone number/paypal email in settings when not hovered.",
value: false
}, {
type: "switch",
id: "hideWelcomeMessage",
name: "Hide server welcome message",
note: "Hides welcome message in servers (first server message in top channel).",
value: false
}, {
type: "switch",
id: "hideMessageDivider",
name: "Hide message dividers",
note: "Hides message dividers in the chat.",
value: false
}]
}, {
type: "category",
id: "themes",
name: "UI themes",
collapsible: true,
shown: false,
settings: [{
type: "switch",
id: "themeShadow",
name: "Shadow theme",
note: "Adds slight shadows to a lot of items such as profile pictures and images in chat.",
value: false
}, {
type: "switch",
id: "themeStatusPicker",
name: "Status picker theme",
note: "Adds more color to the status picker and removes unnecessary hints.",
value: false
}, {
type: "switch",
id: "themeSquaredShadow",
name: "Squared/sharp theme",
note: "Makes a lot of items such as the LIVE tag or the VC member count squared, and makes them look sharper by adding a subtle shadow.",
value: false
}, {
type: "switch",
id: "themeWaves",
name: "Wave theme",
note: "Adds wavey background to multiple UI elements.",
value: false
}]
}],
css: {
hideGiftNitro: `.buttons-205you [tabindex="3"] { display: none; }`,
hideUnnecessaryProfile: `
.footer-1fjuF6, .bodyTitle-Y0qMQz, .userInfoSectionHeader-CBvMDh, .headerTextNormal-2mGWX3 { display: none; }
.userInfoSection-2acyCx+.userInfoSection-2acyCx, .tabBarContainer-1s1u-z { border-top: none; }
`,
squaredRoles: `.role-2irmRk { border-radius: 2px; } .roleCircle-3xAZ1j { border-radius: 2px; width: 10px; height: 10px; opacity: 0.7 }`,
lowerBrightnessTimestamp: `.timestampCozy-2hLAPV { opacity: 0.7; }`,
lowerBrightnessServerNotif: `.pill-31IEus { opacity: 0.5; }`,
hideBlocked: `.messageGroupBlocked-3wrQQX , .messageGroupBlockedBtn-1PBBh- { display:none }`,
blurEmail: `
.userInfoViewing-16kqK3 .flexChild-faoVW3 > div:nth-child(2) .viewBody-2Qz-jg.selectable-x8iAUj { filter: blur(5px); }
.userInfoViewing-16kqK3 .flexChild-faoVW3 > div:nth-child(2) .viewBody-2Qz-jg.selectable-x8iAUj:hover { filter: none; }
#user-settings > div:nth-child(3) > div > div.contentRegion-3nDuYy.da-contentRegion > div > div > div > div.contentColumn-2hrIYH.da-contentColumn.contentColumnDefault-1VQkGM.da-contentColumnDefault > div > div.userSettingsSecurity-3IYeMF.da-userSettingsSecurity.marginTop60-3PGbtK.da-marginTop60 > div > div > div > div > div.marginBottom40-2vIwTv.da-marginBottom40.marginTop40-i-78cZ.da-marginTop40 > div > div.description-3_Ncsb.formText-3fs7AJ.da-description.da-formText.marginBottom8-AtZOdT.da-marginBottom8.modeDefault-3a2Ph1.da-modeDefault.primary-jw0I4K { filter: blur(5px); }
#user-settings > div:nth-child(3) > div > div.contentRegion-3nDuYy.da-contentRegion > div > div > div > div.contentColumn-2hrIYH.da-contentColumn.contentColumnDefault-1VQkGM.da-contentColumnDefault > div > div.userSettingsSecurity-3IYeMF.da-userSettingsSecurity.marginTop60-3PGbtK.da-marginTop60 > div > div > div > div > div.marginBottom40-2vIwTv.da-marginBottom40.marginTop40-i-78cZ.da-marginTop40 > div > div.description-3_Ncsb.formText-3fs7AJ.da-description.da-formText.marginBottom8-AtZOdT.da-marginBottom8.modeDefault-3a2Ph1.da-modeDefault.primary-jw0I4K:hover { filter: none; }
#user-settings > div:nth-child(3) > div > div.contentRegion-3nDuYy.da-contentRegion > div > div > div > div.contentColumn-2hrIYH.da-contentColumn.contentColumnDefault-1VQkGM.da-contentColumnDefault > div > div:nth-child(1) > div:nth-child(2) > div > div > div.flex-1xMQg5.flex-1O1GKY.da-flex.da-flex.vertical-V37hAW.flex-1O1GKY.directionColumn-35P_nr.justifyStart-2NDFzi.alignStretch-DpGPf3.noWrap-3jynv6.descriptionWrapper-1YBY_J.da-descriptionWrapper > div.subText-V8PTt8.da-subText { filter: blur(5px); }
#user-settings > div:nth-child(3) > div > div.contentRegion-3nDuYy.da-contentRegion > div > div > div > div.contentColumn-2hrIYH.da-contentColumn.contentColumnDefault-1VQkGM.da-contentColumnDefault > div > div:nth-child(1) > div:nth-child(2) > div > div > div.flex-1xMQg5.flex-1O1GKY.da-flex.da-flex.vertical-V37hAW.flex-1O1GKY.directionColumn-35P_nr.justifyStart-2NDFzi.alignStretch-DpGPf3.noWrap-3jynv6.descriptionWrapper-1YBY_J.da-descriptionWrapper > div.subText-V8PTt8.da-subText:hover { filter: none; }
#user-settings > div:nth-child(3) > div > div.contentRegion-3nDuYy.da-contentRegion > div > div > div > div.contentColumn-2hrIYH.da-contentColumn.contentColumnDefault-1VQkGM.da-contentColumnDefault > div > div.content-mfgrep.da-content > div > div.details-1YZMDP.da-details > div.container-2Zlzt0.da-container > div > div.dropdown-2fxkrS.da-dropdown > div > div > div > div.paymentSourceLabel-1lo4Ca.da-paymentSourceLabel { filter: blur(5px); }
#user-settings > div:nth-child(3) > div > div.contentRegion-3nDuYy.da-contentRegion > div > div > div > div.contentColumn-2hrIYH.da-contentColumn.contentColumnDefault-1VQkGM.da-contentColumnDefault > div > div.content-mfgrep.da-content > div > div.details-1YZMDP.da-details > div.container-2Zlzt0.da-container > div > div.dropdown-2fxkrS.da-dropdown > div > div > div > div.paymentSourceLabel-1lo4Ca.da-paymentSourceLabel:hover { filter: none; }
`,
hideWelcomeMessage: `.da-welcomeMessage { display: none; }`,
hideMessageDivider: `.divider-32i8lo { display: none; }`,
themeShadow: `
.connectionIcon-2ElzVe, .inner-2Y6JuD, .icon-3j1dJB, .image-S2twTr, .planName-1SYoJ1, .icon-3GaxIC, .guildFeaturesImage-31NjJI, .tier1Image-19VwIC, .headerIcon-3bqya6, .flowerStar-1GeTsn, .icon-4lJsMQ,
.icon-22AiRD, .homeIcon-tEMBK1, .button-2vd_v_, .icon-1_QxNX, .button-14-BFJ, .giftIcon-2Pjbiy, .tierIcon-2qSKGj, .perkIcon-3bbUNB, .tierLock-3CSxSX, .avatarUploaderInner-3UNxY3,
.image-1GzsFd, .flexChild-faoVW3, .icon-2fGOj8, .tierLock-1oFMOZ, .tierIcon-36mHr9, .guildCard-2arfcG, .container-35JN_A, .applicationIcon-3-RUVw, .clickableIcon-2uyAYz, .card-GqTca8, .icon-1EDgZt,
.emptyStateImage-2eMp68, .icon-1kp3fr, .connectedAccountIcon-3P3V6F, .callAvatarVoice-29N_wG, .regionSelectFlag-1htPow, .icon-3o6xvg, .avatar-17mtNa, .avatar-3uk_u9, .avatar-3elDyV, .wrapper-3t9DeA,
.embedAuthorIcon--1zR3L, .gameIcon-gg34Dz, .assetsLargeImageUserPopout-3Pp8BK, .assetsLargeImageProfile-3YXDex, .assetsLargeImage-eYwpTX, .itemIcon-3gdJnE, .appAvatar-3bgkQ9, .tier1Banner-1B_WXY,
.details-1YZMDP, .tile-QA_yMc, .membershipDialog-rVL-t_, .video-34IsHk, .wrapper-3jrx9n, .preview-2nSL_2, .imageWrapper-2p5ogY, .embed-IeVjo6, .connectedAccount-36nQx7, .tierNoneContainer-3hhK3h,
.tier-12tKuZ, .tierNoneCard-peD7hV, .invite-18yqGF, .headerIcon-1OW_re, .image-1kcgs9 { filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2)); }
`,
themeStatusPicker: `
.menu-Sp6bN1 > div:nth-child(2), .menu-Sp6bN1 > div:nth-child(6) { display: none; }
.menu-Sp6bN1 > div:nth-child(1) > div > div { color: rgb(67, 181, 129); opacity: 0.7; }
.menu-Sp6bN1 > div:nth-child(3) > div > div { color: rgb(250, 166, 26); opacity: 0.7; }
.menu-Sp6bN1 > div:nth-child(4) > div > div { color: rgb(240, 71, 71); opacity: 0.7; }
.menu-Sp6bN1 > div:nth-child(5) > div > div { color: rgb(116, 127, 141); opacity: 0.7; }
.helper-2c73HK { display: none; }
.customStatusText-Kh6K1M { opacity: 0.7; }
`,
themeSquaredShadow: `
.botTagInvert-18-95s, .botTagRegular-2HEhHi, .liveRed-lUmv1v, .akaBadge-1M-1Gw, .callAvatarStatus-3vMeXZ, .ghostPill-2-KUPM, .actionButton-3W1xZa, .inner-zqa7da, .exitButton-1DkWLl, .wrapper-pZmgj4,
.div.container-3gCOGc.da-container > div.container-1r6BKw.da-container.themed-ANHk51.da-themed > div.children-19S4PO.da-children > div.tabBar-1E2ExX.da-tabBar.topPill-30KHOu > div:nth-child(5),
.div.container-3gCOGc.da-container > div.friendsTable-133bsv.da-friendsTable > div.friendTableAddWrapper-nHHZtK.da-friendTableAddWrapper > div > div > form, .tierUnlocked-25K6Kv, .boostCount-UFqabz,
.price-1rEl-z, .tier-3H4BXk, .guildSubscription-3aD0-T, .subscriptionDuration-UvxLGw, .yearlyDiscount-CT_3BQ { border-radius: 2px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.19); }
`,
themeWaves: `
/* 0.03 */
.membersWrap-2h-GB4 > div:nth-child(1) > div:nth-child(1), .sidebar-2K8pFh > div:nth-child(1) > div:nth-child(3), .videoBackground-3AY_fu, .privateChannels-1nO12o > div:nth-child(2) > div:nth-child(1),
.integration-3kMeY4, .paymentRowHeader-2sfDdN, .pageActions-1SVAnA, .codeRedemptionRedirect-1wVR4b, .tierHeaderContent-2-YfvN, .chat-3bRxxu > div:nth-child(1), .boost-4xzKsM,
.attendeeCTA-3ZZQWt, .authedApp-mj2Hmd, .option-1l2vXE, .tierHeaderLocked-1s2JJz, .tierNoneContainer-3hhK3h, .footer-3rDWdC, .incomingCallInner-2VmFiR, .tierHeaderUnlocked-1n-OTI { background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
/* 0.05 */
.connectionHeader-2MDqhu, .headerNormal-T_seeN > div:nth-child(1), .topSectionNormal-2-vo2m, .userInfoViewing-16kqK3, .accountList-33MS45, .formNotice-2_hHWR { background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
/* 0.07 */
.headerSpotify-zpWxgT > div:nth-child(2), .topSectionSpotify-1lI0-P, .topSectionStreaming-1Tpf5X, .activityUserPopout-2yItg2, .headerPlaying-j0WQBV > div:nth-child(2), .topSectionPlaying-1J5E4n { background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
/* 0.15 */
.headerSpotify-zpWxgT > div:nth-child(1), .headerTop-3C2Zn0, .headerPlaying-j0WQBV > div:nth-child(1) { background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
`
}
};
return !global.ZeresPluginLibrary ? class {
getName() {
return config.info.name;
}
getAuthor() {
return config.info.authors.map(a => a.name).join(", ");
}
getDescription() {
return config.info.description;
}
getVersion() {
return config.info.version;
}
load() {
window.BdApi.alert("Library Missing", `The library plugin needed for ${config.info.name} is missing.<br /><br /> <a href="https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js" target="_blank">Click here to download the library!</a>`);
}
start() {}
stop() {}
} : (([Plugin, Api]) => {
const plugin = (Plugin, Api) => {
const {
PluginUtilities,
} = Api;
return class UIMods extends Plugin {
constructor() {
super();
this.settings = ZeresPluginLibrary.PluginUtilities.loadSettings(this.getName(), config)
this.allSnippets = ["hideGiftNitro", "hideUnnecessaryProfile", "squaredRoles", "lowerBrightnessTimestamp", "lowerBrightnessServerNotif", "hideBlocked", "blurEmail", "hideWelcomeMessage", "hideMessageDivider"]
this.allThemes = ["themeShadow", "themeStatusPicker", "themeSquaredShadow", "themeWaves"]
}
onStart() {
this.allSnippets.forEach(item => {
if(eval(`this.settings.snippets.${item}`)) PluginUtilities.addStyle(this.getName() + `-style-${item}`, eval(`config.css.${item}`))
})
this.allThemes.forEach(item => {
if(eval(`this.settings.themes.${item}`)) PluginUtilities.addStyle(this.getName() + `-style-${item}`, eval(`config.css.${item}`))
})
}
onStop() {
this.allSnippets.concat(this.allThemes).forEach(item => {
PluginUtilities.removeStyle(this.getName() + `-style-${item}`, eval(`config.css.${item}`))
})
}
getSettingsPanel() {
const panel = this.buildSettingsPanel()
panel.addListener(this.updateSettings.bind(this))
return panel.getElement()
}
updateSettings(group, id, value) {
this.updateCSS(id, value)
}
updateCSS(id, value) {
var style = { name: this.getName() + `-style-${id}`, css: eval(`config.css.${id}`) }
value ? PluginUtilities.addStyle(style.name, style.css) : PluginUtilities.removeStyle(style.name, style.css)
console.log(`${value ? "Added" : "Removed"} ${this.getName()}-style-${id}`)
}
}
}
return plugin(Plugin, Api);
})(global.ZeresPluginLibrary.buildPlugin(config));
})();