home/oldconfig: Add some more config files

This commit is contained in:
The Hedgehog 2022-07-18 07:33:45 -04:00
parent 03366a7bab
commit 2395fddc80
No known key found for this signature in database
77 changed files with 34296 additions and 0 deletions

View file

@ -1,5 +1,17 @@
{
xdg.configFile = {
"BetterDiscord" = {
source = ../oldconfig/BetterDiscord;
recursive = true;
};
"beets" = {
source = ../oldconfig/beets;
recursive = true;
};
"btop" = {
source = ../oldconfig/btop;
recursive = true;
};
"kak" = {
source = ../oldconfig/kak;
recursive = true;

View file

@ -0,0 +1,15 @@
{
"general": {
"download": true,
"emoteMenu": true,
"hideEmojiMenu": true,
"modifiers": true,
"animateOnHover": true
},
"categories": {
"twitchglobal": true,
"twitchsubscriber": true,
"frankerfacez": true,
"bttv": true
}
}

View file

@ -0,0 +1,14 @@
{
"version": "1.5.3",
"drawerStates": {
"settings": {
"addons": false,
"editor": true,
"window": false,
"developer": false,
"general": false,
"customcss": false
}
},
"emoteVersion": "v1.5.3"
}

View file

@ -0,0 +1,55 @@
{
"PluginRepo": true,
"BDFDB": true,
"ThemeRepo": true,
"AccountDetailsPlus": false,
"ZeresPluginLibrary": true,
"Animations": false,
"AutoIdleOnAFK": false,
"BDContextMenu": true,
"BetterCodeblocks": false,
"BetterFolders": false,
"BetterFormattingRedux": false,
"BetterInvites": true,
"BetterMediaPlayer": false,
"BetterFriendList": false,
"BetterVolume": false,
"BetterSearchPage": true,
"BetterMessageLinks": true,
"CharCounter": true,
"CallTimeCounter": false,
"ChannelPermissions": false,
"CollapsibleUI": false,
"ColorSighted": false,
"CompleteTimestamps": false,
"ColorTooltips": false,
"Copier": false,
"CreationDate": false,
"DateViewer": false,
"DisableStickerSuggestions": false,
"discordExperiments": false,
"DoNotTrack": true,
"DoubleClickVoiceChannels": true,
"EmojiStatistics": false,
"GoogleSearchReplace": false,
"HideDisabledEmojis": false,
"ImageUtilities": false,
"JoinedAtDate": false,
"OpenSteamLinksInApp": true,
"PermissionsViewer": false,
"PlatformIndicators": false,
"PronounDB": false,
"QuickToggler": true,
"ServerCounter": false,
"ServerConfig": false,
"ServerDetails": false,
"ServerFolders": true,
"ShowConnections": false,
"ShutUpClyde": true,
"ThemeSettings": true,
"TypingIndicator": true,
"BugReportHelper": false,
"UserDetails": false,
"CumcordLoader": false,
"HideChannels": false
}

View file

@ -0,0 +1,40 @@
{
"general": {
"emotes": true,
"publicServers": false,
"voiceDisconnect": true,
"showToasts": true,
"mediaKeys": true
},
"addons": {
"addonErrors": true,
"autoReload": true,
"editAction": "detached"
},
"customcss": {
"customcss": true,
"liveUpdate": false,
"openAction": "settings"
},
"editor": {
"lineNumbers": true,
"minimap": true,
"hover": true,
"quickSuggestions": true,
"fontSize": 14,
"renderWhitespace": "selection"
},
"window": {
"transparency": false,
"removeMinimumSize": false,
"frame": false
},
"developer": {
"debugLogs": false,
"devTools": true,
"debuggerHotkey": false,
"reactDevTools": false,
"inspectElement": false,
"devToolsWarning": true
}
}

View file

@ -0,0 +1,8 @@
{
"Modern Channel Indicators": true,
"Pixelcord": false,
"RadialStatus": false,
"SettingsModal": true,
"Tokyo Night": true,
"Pywal-Discord": false
}

View file

@ -0,0 +1,28 @@
{
"all": {
"changeLogs": {
"BDFDB": "2.3.2",
"BetterSearchPage": "1.2.0",
"CompleteTimestamps": "1.6.1",
"CreationDate": "1.4.6",
"EmojiStatistics": "2.9.8",
"ImageUtilities": "4.7.1",
"JoinedAtDate": "1.3.3",
"OpenSteamLinksInApp": "1.1.4",
"ThemeSettings": "1.3.3"
},
"choices": {
"toastPosition": "right"
},
"general": {
"showToasts": true,
"showSupportBadges": true,
"useChromium": false,
"shareData": true
},
"hashes": {
"0BDFDB.data.json": "bfb5b8a3318a63fd624e036579a5304a9d19e733",
"0BDFDB.raw.css": "96fb638350f77c79c3648050d58a0ea7a700ea1b"
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.0.2",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,170 @@
/**
* @name AccountDetailsPlus
* @version 1.0.2
* @authorLink https://twitter.com/IAmZerebos
* @website https://github.com/rauenzi/BetterDiscordAddons/tree/master/Plugins/AccountDetailsPlus
* @source https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/AccountDetailsPlus/AccountDetailsPlus.plugin.js
* @updateUrl https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/AccountDetailsPlus/AccountDetailsPlus.plugin.js
*/
/*@cc_on
@if (@_jscript)
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
var pathSelf = WScript.ScriptFullName;
// Put the user at ease by addressing them in the first person
shell.Popup("It looks like you've mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
shell.Popup("I'm in the correct folder already.", 0, "I'm already installed", 0x40);
} else if (!fs.FolderExists(pathPlugins)) {
shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
} else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
// Show the user where to put plugins in the future
shell.Exec("explorer " + pathPlugins);
shell.Popup("I'm installed!", 0, "Successfully installed", 0x40);
}
WScript.Quit();
@else@*/
module.exports = (() => {
const config = {info:{name:"AccountDetailsPlus",authors:[{name:"Zerebos",discord_id:"249746236008169473",github_username:"rauenzi",twitter_username:"ZackRauen"}],version:"1.0.2",description:"Lets you view popout, nickname and more from your account panel at the bottom.",github:"https://github.com/rauenzi/BetterDiscordAddons/tree/master/Plugins/AccountDetailsPlus",github_raw:"https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/AccountDetailsPlus/AccountDetailsPlus.plugin.js"},changelog:[{title:"Fixed",type:"fixed",items:["Fixed username & avatar disappearing."]}],main:"index.js",defaultConfig:[{type:"dropdown",id:"popoutOnClick",name:"Which should be shown on the left click of your avatar? (Opposite will be shown on right click)",value:true,options:[{label:"Status Picker",value:false},{label:"User Popout",value:true}]},{type:"dropdown",id:"nicknameByDefault",name:"Which should be shown by default? (Opposite will be shown on hover)",value:true,options:[{label:"Username",value:false},{label:"Nickname",value:true}]}]};
return !global.ZeresPluginLibrary ? class {
constructor() {this._config = config;}
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() {
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js");
await new Promise(r => require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r));
});
}
});
}
start() {}
stop() {}
} : (([Plugin, Api]) => {
const plugin = (Plugin, Api) => {
const {DiscordModules, DiscordSelectors, WebpackModules, Logger, ReactComponents, Patcher, Utilities} = Api;
const rawClasses = WebpackModules.getByProps("container", "avatar", "hasBuildOverride");
const container = DiscordSelectors.AccountDetails.container || `.${rawClasses.container.split(" ").join(".")}`;
const username = `.${rawClasses.usernameContainer.split(" ").join(".")}`;
const renderUserPopout = (props) => {
const guild = DiscordModules.SelectedGuildStore.getGuildId();
const channel = DiscordModules.SelectedChannelStore.getChannelId();
return DiscordModules.React.createElement(DiscordModules.UserPopout, Object.assign({}, props, {
userId: DiscordModules.UserStore.getCurrentUser().id,
guildId: guild,
channelId: channel
}));
};
return class AccountDetailsPlus extends Plugin {
async onStart() {
this.currentUser = DiscordModules.UserStore.getCurrentUser();
this.promises = {state: {cancelled: false}, cancel() {this.state.cancelled = true;}};
this.patchAccountAvatar(this.promises.state);
this.patchUsername();
}
onStop() {
Patcher.unpatchAll();
if (this.unpatchUsername) this.unpatchUsername();
}
async patchAccountAvatar(promiseState) {
const Account = await ReactComponents.getComponentByName("Account", ".container-YkUktl");
if (promiseState.cancelled) return;
Patcher.after(Account.component.prototype, "render", (thisObject, _, retAccount) => {
if (!thisObject._renderStatusPickerPopout) thisObject._renderStatusPickerPopout = thisObject.renderStatusPickerPopout;
const popoutWrap = Utilities.findInReactTree(retAccount, (n) => n && typeof(n.children) === "function");
const popoutWrapRender = popoutWrap.children;
if (!popoutWrap || typeof(popoutWrapRender) !== "function") return retAccount;
popoutWrap.children = (popoutProps) => {
const retPopout = Reflect.apply(popoutWrapRender, thisObject, [popoutProps]);
const avatarWrap = Utilities.getNestedProp(retPopout, "props.children.props");
const avatarRender = avatarWrap.children;
if (!avatarWrap || !avatarRender) return retPopout;
avatarWrap.children = avatarProps => {
const originalClick = avatarProps.onClick;
avatarProps.onContextMenu = (e) => {
thisObject.renderStatusPickerPopout = this.settings.popoutOnClick ? thisObject._renderStatusPickerPopout : renderUserPopout;
originalClick(e);
thisObject.forceUpdate();
};
avatarProps.onClick = (e) => {
thisObject.renderStatusPickerPopout = this.settings.popoutOnClick ? renderUserPopout : thisObject._renderStatusPickerPopout;
originalClick(e);
thisObject.forceUpdate();
};
return Reflect.apply(avatarRender, thisObject, [avatarProps]);
};
return retPopout;
};
});
}
getNickname(guildId = DiscordModules.SelectedGuildStore.getGuildId()) {
const nick = DiscordModules.GuildMemberStore.getNick(guildId, this.currentUser.id);
return nick ? nick : this.currentUser.username;
}
patchUsername() {
this.onSwitch = this.adjustNickname;
const accountDetails = document.querySelector(container);
if (!accountDetails) return Logger.err("Could not find accountDetails element");
const nameElement = accountDetails.querySelector(username);
const hoverChange = event => {
const nick = this.getNickname();
if (this.settings.nicknameByDefault) nameElement.textContent = event.type === "mouseenter" ? this.currentUser.username : nick;
else nameElement.textContent = event.type === "mouseenter" ? nick : this.currentUser.username;
};
accountDetails.addEventListener("mouseenter", hoverChange);
accountDetails.addEventListener("mouseleave", hoverChange);
this.unpatchUsername = () => {
delete this.onSwitch;
accountDetails.removeEventListener("mouseenter", hoverChange);
accountDetails.removeEventListener("mouseleave", hoverChange);
nameElement.textContent = this.currentUser.username;
};
this.adjustNickname();
}
adjustNickname() {
const accountDetails = document.querySelector(container);
if (!accountDetails) return Logger.err("Could not find accountDetails element");
const nameElement = accountDetails.querySelector(username);
const nick = this.getNickname();
if (this.settings.nicknameByDefault) nameElement.textContent = nick;
else nameElement.textContent = this.currentUser.username;
}
getSettingsPanel() {
return this.buildSettingsPanel().getElement();
}
};
};
return plugin(Plugin, Api);
})(global.ZeresPluginLibrary.buildPlugin(config));
})();
/*@end@*/

View file

@ -0,0 +1,82 @@
{
"currentVersionInfo": {
"version": "1.2.10.3",
"hasShownChangelog": true
},
"settings": {
"lists": {
"enabled": true,
"name": "brick-up",
"page": 0,
"sequence": "fromFirst",
"selectors": "",
"custom": {
"enabled": false,
"frames": [
"",
"",
"",
""
],
"page": 0
},
"duration": 0.4,
"delay": 0.04,
"limit": 65
},
"buttons": {
"enabled": true,
"name": "brick-down",
"page": 0,
"sequence": "fromFirst",
"selectors": "",
"custom": {
"enabled": false,
"frames": [
"",
"",
"",
""
],
"page": 0
},
"duration": 0.3,
"delay": 0.2
},
"messages": {
"enabled": true,
"name": "brick-down",
"page": 0,
"custom": {
"enabled": false,
"frames": [
"",
"",
"",
""
],
"page": 0
},
"duration": 0.4,
"delay": 0.04,
"limit": 30
},
"popouts": {
"enabled": true,
"name": "slide-up",
"page": 0,
"selectors": "",
"custom": {
"enabled": false,
"frames": [
"",
"",
"",
""
],
"page": 0
},
"duration": 0.5
}
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.3.0",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.1.10",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,157 @@
/**
* @name BDContextMenu
* @version 0.1.10
* @authorLink https://twitter.com/IAmZerebos
* @website https://github.com/rauenzi/BetterDiscordAddons/tree/master/Plugins/BDContextMenu
* @source https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/BDContextMenu/BDContextMenu.plugin.js
* @updateUrl https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/BDContextMenu/BDContextMenu.plugin.js
*/
/*@cc_on
@if (@_jscript)
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
var pathSelf = WScript.ScriptFullName;
// Put the user at ease by addressing them in the first person
shell.Popup("It looks like you've mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
shell.Popup("I'm in the correct folder already.", 0, "I'm already installed", 0x40);
} else if (!fs.FolderExists(pathPlugins)) {
shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
} else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
// Show the user where to put plugins in the future
shell.Exec("explorer " + pathPlugins);
shell.Popup("I'm installed!", 0, "Successfully installed", 0x40);
}
WScript.Quit();
@else@*/
module.exports = (() => {
const config = {info:{name:"BDContextMenu",authors:[{name:"Zerebos",discord_id:"249746236008169473",github_username:"rauenzi",twitter_username:"ZackRauen"}],version:"0.1.10",description:"Adds BD shortcuts to the settings context menu.",github:"https://github.com/rauenzi/BetterDiscordAddons/tree/master/Plugins/BDContextMenu",github_raw:"https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/BDContextMenu/BDContextMenu.plugin.js"},changelog:[{title:"Bugfixes",type:"fixed",items:["Context menu should show up again.","Scrollers in submenus show up again."]}],main:"index.js"};
return !global.ZeresPluginLibrary ? class {
constructor() {this._config = config;}
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() {
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js");
await new Promise(r => require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r));
});
}
});
}
start() {}
stop() {}
} : (([Plugin, Api]) => {
const plugin = (Plugin, Api) => {
const {Patcher, DiscordModules, DCM, PluginUtilities} = Api;
const collections = window.BdApi.settings;
const css = `#user-settings-cog-BetterDiscord--Settings + .layer-2aCOJ3 .submenu-1apzyU .scroller-1bVxF5 {
max-height: 320px;
}
#user-settings-cog-BetterDiscord--Emotes + .layer-2aCOJ3 .submenu-1apzyU .scroller-1bVxF5 {
max-height: 320px;
}
#user-settings-cog-BetterDiscord--Plugins + .layer-2aCOJ3 .submenu-1apzyU .scroller-1bVxF5 {
max-height: 320px;
}
#user-settings-cog-BetterDiscord--Themes + .layer-2aCOJ3 .submenu-1apzyU .scroller-1bVxF5 {
max-height: 320px;
}`;
return class BDContextMenu extends Plugin {
async onStart() {
this.promises = {state: {cancelled: false}, cancel() {this.state.cancelled = true;}};
this.patchSettingsContextMenu(this.promises.state);
PluginUtilities.addStyle("BDCM", css);
}
onStop() {
this.promises.cancel();
PluginUtilities.removeStyle("BDCM");
Patcher.unpatchAll();
}
async patchSettingsContextMenu(promiseState) {
const SettingsContextMenu = await DCM.getDiscordMenu("UserSettingsCogContextMenu");
if (promiseState.cancelled) return;
Patcher.after(SettingsContextMenu, "default", (component, args, retVal) => {
const items = collections.map(c => this.buildCollectionMenu(c));
items.push({label: "Custom CSS", action: () => {this.openCategory("custom css");}});
items.push(this.buildAddonMenu("Plugins", window.BdApi.Plugins));
items.push(this.buildAddonMenu("Themes", window.BdApi.Themes));
retVal.props.children.push(DCM.buildMenuItem({type: "separator"}));
retVal.props.children.push(DCM.buildMenuItem({type: "submenu", label: "BetterDiscord", items: items}));
});
}
buildCollectionMenu(collection) {
return {
type: "submenu",
label: collection.name,
action: () => {this.openCategory(collection.name.toLowerCase());},
items: collection.settings.map(category => {
return {
type: "submenu",
label: category.name,
action: () => () => {this.openCategory(collection.name.toLowerCase());},
items: category.settings.filter(s => s.type === "switch" && !s.hidden).map(setting => {
return {
type: "toggle",
label: setting.name,
active: window.BdApi.isSettingEnabled(collection.id, category.id, setting.id),
action: () => window.BdApi.toggleSetting(collection.id, category.id, setting.id)
};
})
};
})
};
}
buildAddonMenu(label, manager) {
const ids = manager.getAll().map(a => a.name || a.getName()).sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
return {
type: "submenu",
label: label,
action: () => {this.openCategory(label.toLowerCase());},
items: ids.map(addon => {
return {
type: "toggle",
label: addon,
active: manager.isEnabled(addon),
action: () => {manager.toggle(addon);}
};
})
};
}
async openCategory(id) {
DiscordModules.ContextMenuActions.closeContextMenu();
DiscordModules.UserSettingsWindow.open(DiscordModules.DiscordConstants.UserSettingsSections.ACCOUNT);
while (!document.getElementsByClassName("bd-sidebar-header").length) await new Promise(r => setTimeout(r, 100));
const tabs = document.querySelectorAll(".bd-sidebar-header ~ .item-PXvHYJ");
const index = Array.from(tabs).findIndex(e => e.textContent.toLowerCase() === id);
if (tabs[index] && tabs[index].click) tabs[index].click();
}
};
};
return plugin(Plugin, Api);
})(global.ZeresPluginLibrary.buildPlugin(config));
})();
/*@end@*/

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.2.4",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.3.3",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"settings": {
"closeOnOpen": true,
"folders": {}
}
}

View file

@ -0,0 +1,58 @@
{
"currentVersionInfo": {
"version": "2.3.12",
"hasShownChangelog": true
},
"settings": {
"toolbar": {
"bold": true,
"italic": true,
"underline": true,
"strikethrough": true,
"spoiler": true,
"code": true,
"codeblock": true,
"superscript": true,
"smallcaps": true,
"fullwidth": true,
"upsidedown": true,
"varied": true,
"leet": false,
"thicc": false
},
"formats": {
"superscript": true,
"smallcaps": true,
"fullwidth": true,
"upsidedown": true,
"varied": true,
"leet": false,
"thicc": false
},
"wrappers": {
"superscript": "^^",
"smallcaps": "%%",
"fullwidth": "##",
"upsidedown": "&&",
"varied": "==",
"leet": "++",
"thicc": "$$"
},
"formatting": {
"fullWidthMap": true,
"reorderUpsidedown": true,
"fullwidth": true
},
"plugin": {
"hoverOpen": true,
"chainFormats": true,
"closeOnSend": true
},
"style": {
"icons": true,
"rightSide": true,
"toolbarOpacity": 1,
"fontSize": 85
}
}
}

View file

@ -0,0 +1,12 @@
{
"all": {
"general": {
"addTotalAmount": true,
"addFavorizedCategory": true,
"addHiddenCategory": true,
"addSortOptions": true,
"addSearchbar": true,
"addMutualGuild": true
}
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.6.1",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,279 @@
/**
* @name BetterInvites
* @author HypedDomi#1711
* @authorId 354191516979429376
* @version 1.6.1
* @description Shows some useful information in the invitation
* @invite gp2ExK5vc7
* @source https://github.com/HypedDomi/BetterDiscordStuff/tree/main/Plugins/BetterInvites
* @updateUrl https://betterdiscord.app/gh-redirect/?id=539
* @donate https://paypal.me/dominik1711
* @website https://bd.bambus.me/
*/
const request = require("request");
const fs = require("fs");
const path = require("path");
const config = {
info: {
name: "BetterInvites",
authors: [
{
name: "HypedDomi",
discord_id: "354191516979429376",
},
],
version: "1.6.1",
description:
"Shows some useful information in the invitation",
github:
"https://github.com/HypedDomi/BetterDiscordStuff/tree/main/Plugins/BetterInvites",
github_raw:
"https://raw.githubusercontent.com/HypedDomi/BetterDiscordStuff/main/Plugins/BetterInvites/BetterInvites.plugin.js",
},
changelog: [
{
title: "What's new",
type: "added",
items: ["Added Option to change Discords Splash to the Guild Banner"],
},
{
title: "Small Bugfix",
type: "fixed",
items: ["Fixed wrong order"],
}
],
defaultConfig: [
{
type: "switch",
id: "showBanner",
name: "Show Banner on Invite",
value: true,
},
{
type: "dropdown",
id: "bannerType",
name: "Banner Type",
note: "The type of banner to show",
value: 0,
options: [
{ label: "BetterInvites Banner", value: 0 },
{ label: "Discord Invite Splash", value: 1 }
]
},
{
type: "switch",
id: "showServerBannerForSplash",
name: "Shows the Server Banner instead of the Invite Banner",
note: "Only works for Discord Invite Splash",
value: false,
},
{
type: "switch",
id: "showDescription",
name: "Show Guild Description",
value: true,
},
{
type: "switch",
id: "showBoost",
name: "Show Guild Boost Level",
value: true,
},
{
type: "switch",
id: "showInviter",
name: "Show the User who invited you",
value: true,
},
{
type: "switch",
id: "showVerification",
name: "Show Guild Verification Level",
value: true,
},
{
type: "switch",
id: "showNSFW",
name: "Show Guild NSFW Status",
value: true,
},
{
type: "switch",
id: "showExpire",
name: "Show Invite Expiration",
value: true,
},
{
type: "switch",
id: "bigJoinButton",
name: "Shows a bigger join button",
value: true,
},
]
};
module.exports = !global.ZeresPluginLibrary
? class {
constructor() {
this._config = config;
}
load() {
BdApi.showConfirmationModal(
"Library plugin is needed",
`The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`,
{
confirmText: "Download",
cancelText: "Cancel",
onConfirm: () => {
request.get(
"https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js",
(error, response, body) => {
if (error)
return electron.shell.openExternal(
"https://betterdiscord.app/Download?id=9"
);
fs.writeFileSync(
path.join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"),
body
);
}
);
},
}
);
}
start() {
this.load();
}
stop() { }
}
: (([Plugin, Library]) => {
const { Patcher, DiscordModules, PluginUtilities } = Library;
const { React } = DiscordModules;
const Invite = BdApi.findModule(m => m.default?.displayName === "GuildInvite");
const TooltipContainer = BdApi.findModuleByProps('TooltipContainer').TooltipContainer;
class BetterInvites extends Plugin {
constructor() {
super();
this.getSettingsPanel = () => {
return this.buildSettingsPanel().getElement();
};
}
onStart() {
this.patchInvite();
PluginUtilities.addStyle(this.getName(), ".content-1r-J1r { flex-wrap: wrap; }");
}
patchInvite() {
Patcher.after(Invite, "default", (_, [props], component) => {
const { invite } = props;
if (!invite) return;
const { guild, inviter } = invite;
let expireTooltip = "";
if (invite.expires_at != null) {
const inviteExpireDays = Math.floor((new Date(invite.expires_at) - Date.now()) / 1000 / 60 / 60 / 24);
const inviteExpireHours = Math.floor((new Date(invite.expires_at) - Date.now()) / 1000 / 60 / 60);
const inviteExpireMinutes = Math.floor((new Date(invite.expires_at) - Date.now()) / 1000 / 60);
if (inviteExpireDays > 0) {
inviteExpireDays === 1 ? expireTooltip = `${inviteExpireDays} day` : expireTooltip = `${inviteExpireDays} days`;
} else if (inviteExpireHours > 0) {
inviteExpireHours === 1 ? expireTooltip = `${inviteExpireHours} hour` : expireTooltip = `${inviteExpireHours} hours`;
} else {
inviteExpireMinutes === 1 ? expireTooltip = `${inviteExpireMinutes} minute` : expireTooltip = `${inviteExpireMinutes} minutes`;
}
}
const boostLevel = component.props.children[2].props.children[0].props.guild?.premiumTier;
component.props.children[2].props.children.splice(2, 0,
this.settings.showBoost || this.settings.showInviter || this.settings.showVerification || this.settings.showNSFW || this.settings.showExpire ?
React.createElement("div", { className: `${config.info.name}-iconWrapper`, style: { display: "grid", grid: "auto / auto auto", direction: "rtl", "grid-gap": "3px" } },
// Boost
this.settings.showBoost && boostLevel > 0 ?
React.createElement(TooltipContainer, { text: `Boost Level ${boostLevel}` },
React.createElement("img", { style: { height: "28px", borderRadius: "5px", objectFit: "contain" }, src: "https://discord.com/assets/4a2618502278029ce88adeea179ed435.svg" }))
: null,
// Inviter
this.settings.showInviter && inviter ?
React.createElement(TooltipContainer, { text: `Invited by: ${inviter?.username}#${inviter?.discriminator}` },
React.createElement("img", { style: { height: "28px", borderRadius: "5px", objectFit: "contain" }, onClick: () => { DiscordNative.clipboard.copy(inviter?.id); window.BdApi.showToast("Copied ID", { type: "info", icon: true, timeout: 4000 }) }, src: `https://cdn.discordapp.com/avatars/${inviter?.id}/${inviter?.avatar}.png?size=1024`, onError: (e) => { e.target.src = "https://cdn.discordapp.com/embed/avatars/0.png"; } }))
: null,
// Verification
this.settings.showVerification && guild?.verification_level > 0 ?
React.createElement(TooltipContainer, { text: `Verification Level ${guild?.verification_level}` },
React.createElement("img", { style: { height: "28px", borderRadius: "5px", objectFit: "contain" }, src: "https://discord.com/assets/e62b930d873735bbede7ae1785d13233.svg" }))
: null,
// NSFW
this.settings.showNSFW && guild?.nsfw_level > 0 ?
React.createElement(TooltipContainer, { text: `NSFW Level ${guild?.nsfw_level}` },
React.createElement("img", { style: { height: "28px", borderRadius: "5px", objectFit: "contain" }, src: "https://discord.com/assets/ece853d6c1c1cd81f762db6c26fade40.svg" }))
: null,
// Invite Expiration
this.settings.showExpire && invite.expires_at != null ?
React.createElement(TooltipContainer, { text: `Expires in: ${expireTooltip}` },
React.createElement("img", { style: { height: "28px", borderRadius: "5px", objectFit: "contain" }, src: "https://discord.com/assets/630f5938948131784285d97d57a3e8a0.svg" }))
: null,
) : null
);
const contentDiv = component.props.children[2];
if (this.settings.showDescription && guild?.description) {
contentDiv.props.children.push(
React.createElement("div", { className: `${config.info.name}-guildDescription`, style: { marginTop: "1%" } },
React.createElement("div", { className: "markup-eYLPri" }, guild.description)
)
);
}
if (this.settings.bigJoinButton) {
const joinButton = contentDiv.props.children[3];
contentDiv.props.children.splice(3, 1);
joinButton.props.style = {
width: "100%",
margin: "3% 0 0 0"
};
contentDiv.props.children.push(joinButton);
}
if (!this.settings.showBanner && guild.features.includes("INVITE_SPLASH")) {
component.props.children.splice(0, 1);
} else if (this.settings.showBanner && guild?.banner) {
if (this.settings.bannerType === 1 && this.settings.showServerBannerForSplash) {
if (guild.features.includes("INVITE_SPLASH")) component.props.children.splice(0, 1);
component.props.children.splice(0, 0, React.createElement("div", {
className: `${config.info.name}-banner`,
style: { position: "relative", borderRadius: "4px 4px 0 0", height: "64px", margin: "-16px -16px 16px", overflow: "hidden" }
},
React.createElement("img", {
style: { display: "block", width: "100%", height: "100%", objectFit: "cover" },
src: `https://cdn.discordapp.com/banners/${guild.id}/${guild.banner}.gif?size=1024`,
onError: (e) => { e.target.onError = null, e.target.src = `https://cdn.discordapp.com/banners/${guild.id}/${guild.banner}.png?size=1024` }
})));
} else if (this.settings.bannerType === 0) {
component.props.children.splice(2, 0, React.createElement("img", {
className: `${config.info.name}-banner`,
src: `https://cdn.discordapp.com/banners/${guild.id}/${guild.banner}.gif?size=1024`,
style: { width: "100%", height: "auto", maxHeight: "100px", borderRadius: "5px", objectFit: "cover" },
onError: (e) => { e.target.onError = null, e.target.src = `https://cdn.discordapp.com/banners/${guild.id}/${guild.banner}.png?size=1024` }
}));
if (guild.features.includes("INVITE_SPLASH")) component.props.children.splice(0, 1);
}
}
});
}
onStop() {
Patcher.unpatchAll();
PluginUtilities.removeStyle(this.getName());
}
}
return BetterInvites;
})(global.ZeresPluginLibrary.buildPlugin(config));

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.4.12",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,690 @@
/**
* @name BetterMessageLinks
* @author AGreenPig
* @updateUrl https://raw.githubusercontent.com/TheGreenPig/BetterDiscordPlugins/main/BetterMessageLinks/BetterMessageLinks.plugin.js
* @authorLink https://github.com/TheGreenPig
* @source https://github.com/TheGreenPig/BetterDiscordPlugins/blob/main/BetterMessageLinks/BetterMessageLinks.plugin.js
* @invite JsqBVSCugb
*/
const config = {
"info": {
"name": "BetterMessageLinks",
"authors": [{
"name": "AGreenPig",
"discord_id": "427179231164760066",
"github_username": "TheGreenPig"
}],
"version": "1.4.12",
"description": "Instead of just showing the long and useless discord message link, make it smaller and add a preview. Thanks a ton Strencher for helping me refactor my code and Juby for making the message queueing system. ",
"github_raw": "https://raw.githubusercontent.com/TheGreenPig/BetterDiscordPlugins/main/BetterMessageLinks/BetterMessageLinks.plugin.js",
},
"changelog": [
{
"title": "Fixed",
"type": "fixed",
"items": [
"Fixed crashing issue",
]
},
],
}
/* ----Useful links----
*
* BetterDiscord BdApi documentation:
* https://github.com/BetterDiscord/BetterDiscord/wiki/Creating-Plugins
*
* Zere's Plugin Library documentation:
* https://rauenzi.github.io/BDPluginLibrary/docs/
*/
// This plugin was only made possible by the generous help of Strencher and the MessageLinkEmbed plugin by him and Juby210! They definitely deserve all the credit
module.exports = !global.ZeresPluginLibrary ? class {
constructor() { this._config = config; }
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() {
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for **${config.info.name}** is missing. Please click Download Now to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://betterdiscord.app/Download?id=9");
await new Promise(r => require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r));
});
}
});
}
start() { }
stop() { }
} : (([Plugin, Library]) => {
//Custom css
const customCSS = `
.betterMessageLinks.Popout {
max-width: 280px;
font-size: 14px;
width: fit-content;
max-height: 450px;
overflow: auto;
-webkit-user-select: text;
background: var(--background-floating);
border-radius: 4px;
padding: 1em;
color: var(--text-normal);
overflow-wrap: break-word;
word-wrap: break-word;
-webkit-box-shadow: var(--elevation-high);
box-shadow: var(--elevation-high);
}
.betterMessageLinks em {
font-style: italic;
}
.betterMessageLinks.Settings.Spinner div.info-2FZci4 {
display: flex;
}
.betterMessageLinks.Settings.Spinner div.size14-3fJ-ot:not(.description-30xx7u){
margin-left: auto;
}
.betterMessageLinks.Loading {
display: flex;
align-items: center;
}
.betterMessageLinks.Loading.Spinner {
padding-left: 1.5em;
}
.betterMessageLinks.Loading.Text {
vertical-align: middle;
}
.betterMessageLinks strong {
font-weight: bold;
}
.betterMessageLinks code {
white-space: pre-wrap;
}
.betterMessageLinks blockquote {
max-width: calc(100% - 4px);
}
.betterMessageLinks.Author{
font-weight: bold;
}
.betterMessageLinks.Image {
border-radius: 10px;
max-width: 250px;
padding-top: 5px;
}
.betterMessageLinks.AlignMiddle{
vertical-align: middle;
}
.betterMessageLinks.Icon{
width: 25px;
height: 25px;
}
.betterMessageLinks.Footer{
color: var(--text-muted);
font-size: 0.6rem;
padding-top: 8px;
}
.betterMessageLinks.BotTag{
padding-left: 5px;
padding-right: 5px;
}
.betterMessageLinks.List{
padding-left: 20px;
-webkit-user-select: text;
padding-top: 3px;
}
.betterMessageLinks.ListElement{
font-weight: bold;
}
.betterMessageLinks.ListElement.Symbol{
font-size: 1.1em;
padding-right: 3px;
}
`
const defaultSettings = {
ignoreMessage: false,
ignoreAttachment: false,
messageReplaceText: "<Message>",
attachmentReplaceText: "<Attachment>",
showAuthorIcon: true,
showGuildIcon: true,
noDisplayIfSameGuild: true,
progressBar: true,
spinner: 0,
mentionStyle: true,
animationType: "TRANSLATE",
advancedFooter: `$guildName, $channelName at $timestamp`,
};
const validFooterValues = ["authorName", "guildName", "guildId", "channelName", "channelId", "messageId", "timestamp", "nsfw"]
//Settings and imports
const { WebpackModules, Patcher, Settings, DiscordModules } = { ...BdApi, ...Library };
const { SettingPanel, Switch, Slider, RadioGroup, Textbox, SettingGroup } = Settings;
/**@type {typeof import("react")} */
const React = DiscordModules.React;
//Modules
const MessageStore = WebpackModules.getByProps("hasCurrentUserSentMessage", "getMessage");
const GetGuildModule = DiscordModules.GuildStore;
const GetChannelModule = DiscordModules.ChannelStore;
const User = WebpackModules.find(m => m.prototype && m.prototype.tag);
const Timestamp = WebpackModules.find(m => m.prototype && m.prototype.toDate && m.prototype.month)
const { stringify } = WebpackModules.getByProps('stringify', 'parse', 'encode');
const ImagePlaceHolder = WebpackModules.findByDisplayName("ImagePlaceholder");
const BotTag = WebpackModules.getByProps("BotTagTypes").default;
const Popout = WebpackModules.getByDisplayName("Popout");
const RenderMessageMarkupToASTModule = WebpackModules.getByProps("renderMessageMarkupToAST");
const RepliedMessage = WebpackModules.getModule(m => m && m.default && m.default.displayName == "RepliedMessage");
const MarkdownModule = WebpackModules.getByProps("parseTopic");
const Anchor = WebpackModules.findByDisplayName("Anchor");
let cache = {};
let lastFetch = 0;
let linkQueue = [];
const spinnerTypes = Object.values(DiscordModules.Spinner.Type);
let spinnerSetting = [];
spinnerTypes.forEach((spinnerType, i) => {
let name = spinnerType.replace(/([A-Z])/g, " $1");
name = name.charAt(0).toUpperCase() + name.slice(1);
spinnerSetting.push({
name: name,
desc: React.createElement(DiscordModules.Spinner, { type: spinnerType },),
value: i
})
})
const popoutAnimationTypes = Object.keys(Popout.Animation);
let animationSetting = [];
popoutAnimationTypes.forEach((animationType, i) => {
let name = animationType.toLowerCase();
name = name.charAt(0).toUpperCase() + name.slice(1);
animationSetting.push({
name: name,
desc: "",
value: animationType
})
})
async function getMsg(channelId, messageId) {
let message = MessageStore.getMessage(channelId, messageId) || cache[messageId]
if (!message) {
if (lastFetch > Date.now() - 2500) await new Promise(r => setTimeout(r, 2500))
const data = await DiscordModules.APIModule.get({
url: DiscordModules.DiscordConstants.Endpoints.MESSAGES(channelId),
query: stringify({
limit: 1,
around: messageId
}),
retries: 2
}).catch((error) => {
return error;
})
lastFetch = Date.now()
if (data.ok) {
message = data.body[0]
if (!message) return
message.author = new User(message.author)
message.timestamp = new Timestamp(message.timestamp)
} else {
cache[messageId] = data;
return data;
}
}
cache[messageId] = message
return message;
}
const getMsgWithQueue = (() => {
let pending = Promise.resolve()
const run = async (channelId, messageId, component) => {
try {
await pending
} finally {
linkQueue.shift()
linkQueue.forEach(c => {
c.setState({ queue: linkQueue })
})
return getMsg(channelId, messageId)
}
}
return (channelId, messageId, component) => (pending = run(channelId, messageId, component))
})()
class BetterLink extends React.Component {
constructor(props) {
super(props)
this.state = { loaded: false, message: null };
}
async componentDidMount() {
if (!this.state.loaded) {
let numberMatches = this.props.original.split("/").filter((e) => /^\d+$/.test(e));
let messageId = numberMatches[numberMatches.length - 1];
let channelId = numberMatches[numberMatches.length - 2];
let guildId = numberMatches.length > 2 ? numberMatches[numberMatches.length - 3] : undefined;
linkQueue.push(this)
this.setState({ originalIndex: linkQueue.length, queue: linkQueue })
let message = await getMsgWithQueue(channelId, messageId, this)
if (!message) return
message.guild = guildId ? GetGuildModule.getGuild(guildId) : "@me";
this.setState({ loaded: true, message });
}
}
renderLoading() {
let loadedPercent = Math.max(Math.min(Math.round(((this.state.originalIndex - this.state.queue.indexOf(this)) / this.state.originalIndex) * 100), 100), 0);
return React.createElement("div", { className: "betterMessageLinks AlignMiddle Loading" },
React.createElement("span", { className: "betterMessageLinks AlignMiddle Loading Text" }, `Loading ... ${loadedPercent}%`),
React.createElement("span", { className: "betterMessageLinks AlignMiddle Loading Spinner" },
React.createElement(DiscordModules.Spinner, { type: spinnerTypes[this.props.settings.spinner] })
),
)
}
renderError(message) {
let content = "Unknown Error while trying to fetch message."
if (message.body?.message) {
content = `Error: ${message.body?.message}`;
}
return React.createElement("div", { className: "betterMessageLinks AlignMiddle Error" },
React.createElement("span", { className: "betterMessageLinks AlignMiddle Loading Text" }, content),
)
}
renderHeader(message, hasAttachments) {
const { settings } = this.props;
return React.createElement("div", {
className: "betterMessageLinks-header",
children: [
settings.showGuildIcon && message.guild?.id && (message.guild?.id !== DiscordModules.SelectedGuildStore.getGuildId() || !settings.noDisplayIfSameGuild)
? React.createElement("img", { src: `https://cdn.discordapp.com/icons/${message.guild.id}/${message.guild.icon}.webp`, className: "replyAvatar-sHd2sU betterMessageLinks AlignMiddle Icon" })
: null,
settings.showAuthorIcon
? React.createElement("img", { src: message.author.getAvatarURL(), className: "replyAvatar-sHd2sU betterMessageLinks AlignMiddle Icon" })
: null,
React.createElement("span", { className: "betterMessageLinks Author AlignMiddle" }, message.author.username),
settings.showAuthorIcon && message.author.bot
? React.createElement("span", { className: "betterMessageLinks AlignMiddle BotTag" }, React.createElement(BotTag, {}))
: null,
React.createElement("span", { className: "betterMessageLinks Author AlignMiddle", style: { paddingLeft: "0px" } }, ":"),
hasAttachments
? React.createElement(ImagePlaceHolder, { width: "20px", height: "20px", class: "betterMessageLinks AlignMiddle" })
: null
]
})
}
renderContent(message) {
let content = null;
if (this.props.attachmentLink) {
content = this.props.original.split("/").pop();
} else {
content = this.processNewLines(RenderMessageMarkupToASTModule.default(Object.assign({}, message), { renderMediaEmbeds: true, formatInline: false, isInteracting: true }).content);
}
return React.createElement("span", {
className: "betterMessageLinks AlignMiddle"
}, content);
}
renderAttachment(message) {
if (message.attachments?.length > 0 || message.embeds?.length > 0 || message.sticker_items?.length > 0) {
let isVideo = false;
let url = "";
if (message.attachments[0]?.content_type?.startsWith("video") || message.embeds[0]?.video) {
isVideo = true;
}
if (message.attachments?.length > 0) {
url = message.attachments[0].url
}
else if (message.embeds?.length > 0) {
if (message.embeds[0]?.video) {
url = message.embeds[0].video.url
}
else if (message.embeds[0]?.image) {
url = message.embeds[0]?.image.proxyURL;
}
} else if (message.sticker_items?.length > 0) {
url = `https://media.discordapp.net/stickers/${message.sticker_items[0].id}.png`;
}
if (!url) return null;
return isVideo ?
React.createElement("video", {
className: "betterMessageLinks AlignMiddle Image",
src: url,
loop: true, autoPlay: true, muted: true,
})
: React.createElement("img", {
className: "betterMessageLinks AlignMiddle Image",
src: url,
})
}
return null;
}
renderBetterFooter(advancedFooter, message) {
if (advancedFooter === "") return;
let channel = GetChannelModule.getChannel(message.channel_id);
let author = message?.author;
let authorName = author.username;
let authorId = author.id;
let guildName, guildId = "";
let channelName = "";
let channelId = channel?.id;
let messageId = message.id;
let timestamp = new Date(message.timestamp).toLocaleString();
let nsfw = channel?.nsfw;
if (channel) {
if (channel?.type === DiscordModules.DiscordConstants.ChannelTypes.DM) {
guildName = "DM";
guildId = "@me";
channelName = channel.rawRecipients[0].username;
}
else if (channel?.type === DiscordModules.DiscordConstants.ChannelTypes.GROUP_DM) {
guildName = "DMs"
guildId = "@me";
channelName = channel.rawRecipients.map((e) => e.username).slice(0, 3).join("-");
}
else {
if (message.guild) {
guildName = message.guild.name;
guildId = message.guild.id;
}
channelName = "#" + channel.name;
}
}
//not the prettiest solution, but the best I could come up with currently without using eval or writing data.channel, data.guild, etc. 🤷‍♂️ should be ok for now, maybe I can rework it later
const data = {
authorName: authorName,
authorId: authorId,
guildName: guildName,
guildId: guildId,
channelName: channelName,
channelId: channelId,
messageId: messageId,
timestamp: timestamp,
nsfw: nsfw
};
let footer = advancedFooter;
validFooterValues.forEach((value) => {
footer = footer.replace("$" + value, data[value])
})
if (footer.includes("$")) footer = "Invalid variables set! Make sure you don't use $ unless it's a valid variable."
return React.createElement("div", {
className: "betterMessageLinks Footer"
}, footer);
}
renderAttachmentLink(link) {
let validImageExtensions = ["jpg", "jpeg", "png", "gif", "gifv", "apng", "avif", "jfif", "pjpeg", "pjp", "svg", "webp"]
let validVideoExtensions = ["mp4", "webm", "ogg"];
let extension = link.split(".").pop();
let preview = null;
if (validVideoExtensions.includes(extension)) {
preview = React.createElement("video", {
className: "betterMessageLinks AlignMiddle Image",
src: link,
loop: true, autoPlay: true, muted: true,
})
}
else if (validImageExtensions.includes(extension)) {
preview = React.createElement("img", {
className: "betterMessageLinks AlignMiddle Image",
src: link,
})
}
return React.createElement("div", { className: "betterMessageLinks Author AlignMiddle" },
link.split("/").pop(),
preview
)
}
renderMessage() {
if (this.props.attachmentLink) {
return React.createElement("div", {
className: "betterMessageLinks AlignMiddle Container",
children: [
this.renderAttachmentLink(this.props.original)
]
});
}
const { message } = this.state;
if (!message.ok && !message.id) return this.renderError(message);
let hasAttachments = message.attachments?.length > 0 || message.embeds?.length > 0 || message.sticker_items?.length > 0;
return React.createElement("div", {
className: "betterMessageLinks AlignMiddle Container",
children: [
this.renderHeader(message, hasAttachments),
this.renderContent(message),
this.renderAttachment(message),
this.renderBetterFooter(this.props.settings.advancedFooter, message)
]
});
}
render() {
let { settings } = this.props;
let attachmentLink = this.props.attachmentLink;
let messageReplace = this.props.original;
if (!this.props.replaceOverride) {
if (settings.messageReplaceText !== "" && !attachmentLink) {
messageReplace = settings.messageReplaceText;
} else if (settings.attachmentReplaceText !== "" && attachmentLink) {
messageReplace = settings.attachmentReplaceText;
}
} else {
messageReplace = this.props.replaceOverride;
}
return React.createElement(Popout, {
shouldShow: this.state.showPopout,
position: Popout.Positions.TOP,
align: Popout.Align.CENTER,
animation: Popout.Animation[this.props.settings.animationType],
spacing: 0,
renderPopout: () => {
return React.createElement("div", {
className: "thin-31rlnD scrollerBase-_bVAAt betterMessageLinks Popout",
onMouseEnter: () => this.setState({ showPopout: true }),
onMouseLeave: () => this.setState({ showPopout: false })
}, this.state.loaded || this.props.attachmentLink ? this.renderMessage() : this.renderLoading())
}
}, () => React.createElement(Anchor, {
className: `betterMessageLinks Link${this.props.settings.mentionStyle ? " wrapper-1ZcZW- mention interactive" : ""}`,
href: this.props.original,
children: [messageReplace],
onMouseEnter: () => this.setState({ showPopout: true }),
onMouseLeave: () => this.setState({ showPopout: false })
}))
}
processNewLines(array) {
let processedArray = [];
let tempArray = [];
array.forEach((messageElement) => {
if (!messageElement.type && messageElement.includes("\n")) {
//replaces \n in text with actual newline elements
let split = messageElement.split("\n");
let newLine = React.createElement("br", {});
processedArray.push([newLine].concat(...split.map(e => [e, newLine])).slice(1, -1))
}
else {
processedArray.push(messageElement)
}
})
if (processedArray.length === 0) return array;
return processedArray;
}
}
return class BetterMessageLinks extends Plugin {
async onStart() {
//inject css
BdApi.injectCSS(config.info.name, customCSS)
this.settings = this.loadSettings(defaultSettings);
Patcher.after(MarkdownModule.defaultRules.link, "react", (_, [props], ret) => {
return this.handleLink(ret);
})
//replied messages get checked extra. This isn't really nice code, but it works I guess.
Patcher.after(RepliedMessage, "default", (_, [props], ret) => {
if (props.content?.length > 0) {
props.content.forEach((element, i) => {
if (element.type?.displayName === "MaskedLink") {
props.content[i] = this.handleLink(element);
}
});
}
})
}
handleLink(ret) {
//check if it already is a masked link (the href and content aren't the same), if so, we don't want to change the text. (Can happen in embeds for example)
let isMaskedLink = ret.props.children[0] !== ret.props.href;
if (/^https:\/\/(ptb.|canary.)?discord(app)?.com\/channels\/(\d+|@me)\/\d+\/\d+$/gi.test(ret.props.href) && !this.settings.ignoreMessage) {
return React.createElement(BetterLink, { original: ret.props.href, settings: this.settings, key: config.info.name, replaceOverride: isMaskedLink && ret.props.children[0]})
} else if (/^https:\/\/(media|cdn).discordapp.(com|net)\/attachments\/\d+\/\d+\/.+$/gi.test(ret.props.href) && !this.settings.ignoreAttachment) {
return React.createElement(BetterLink, { original: ret.props.href.split("?")[0], settings: this.settings, attachmentLink: true, key: config.info.name, replaceOverride: isMaskedLink && ret.props.children[0] });
}
return ret;
}
getSettingsPanel() {
let listArray = [];
validFooterValues.forEach((value) => {
listArray.push(React.createElement("li", { class: "betterMessageLinks ListElement" },
React.createElement("span", { class: "betterMessageLinks ListElement Symbol" }, "$"),
value));
})
let unorderedList = React.createElement("ul", {
children: listArray,
class: "betterMessageLinks List"
});
let messageReplaceGroup = new SettingGroup("Message Replace").append(
new Textbox("", "Replace all Discord message links with the following text. Leave empty to not change the Discord Link at all.", this.settings.messageReplaceText, (i) => {
this.settings.messageReplaceText = i;
}, { placeholder: "<Message>" }),
)
let attachmentReplaceGroup = new SettingGroup("Attachment Replace").append(
new Textbox("", "Replace all Discord Attachment links with the following text. Leave empty to not change the Discord Link at all.", this.settings.attachmentReplaceText, (i) => {
this.settings.attachmentReplaceText = i;
}, { placeholder: "<Attachment>" }),
)
let noDisplayIfSameGuildSwitch = new Switch("Don't display Guild icon, if in same Guild", "If you are currently in the same Guild as the message from the link, the icon of the Guild will not be displayed.", this.settings.noDisplayIfSameGuild, (i) => {
this.settings.noDisplayIfSameGuild = i;
})
noDisplayIfSameGuildSwitch.inputWrapper.className += " betterMessageLinks Settings noDisplayIfSameGuildSwitch"
let spinnerRadio = new RadioGroup('Spinner', "Choose the spinner that gets displayed when the message is loading", this.settings.spinner || 0, spinnerSetting, (i) => {
this.settings.spinner = i;
})
spinnerRadio.inputWrapper.className += " betterMessageLinks Settings Spinner";
let animationRadio = new RadioGroup('Popup Animation', "Choose the animation type when the popoup get's opened.", this.settings.animationType || "TRANSLATE", animationSetting, (i) => {
this.settings.animationType = i;
})
animationRadio.inputWrapper.className += " betterMessageLinks Settings Animation";
let appearanceSettingsGroup = new SettingGroup("Appearance").append(
new Switch("Show Author icon", "Display the icon of the Message Author.", this.settings.showAuthorIcon, (i) => {
this.settings.showAuthorIcon = i;
}),
new Switch("Show Guild icon", "Display the guild icon of the message next to the author icon if you aren't in the same guild as the linked message.", this.settings.showGuildIcon, (i) => {
this.settings.showGuildIcon = i;
this.updateSettingsCSS();
}),
noDisplayIfSameGuildSwitch,
new Switch("Show progress bar", "Display a circular progress bar when loading a message.", this.settings.progressBar, (i) => {
this.settings.progressBar = i;
}),
new Switch("Style as mention", "Choose if the link should be styled like a mention (Otherwhise it will be styled like a link).", this.settings.mentionStyle, (i) => {
this.settings.mentionStyle = i;
}),
spinnerRadio,
animationRadio,
new Textbox("Advanced link footer", React.createElement("div", {}, "Add a footer to the popout containing information about the message. Use $value to display specific values. Valid values: ", unorderedList), this.settings.advancedFooter, (i) => {
this.settings.advancedFooter = i;
}),
)
messageReplaceGroup.group.className += " betterMessageLinks SettingsGroup Message";
attachmentReplaceGroup.group.className += " betterMessageLinks SettingsGroup Attachment";
appearanceSettingsGroup.group.className += " betterMessageLinks SettingsGroup Appearance";
this.updateSettingsCSS()
//build the settings panel
return SettingPanel.build(() => this.saveSettings(this.settings),
new Switch("Ignore message links", "Message links will not get replaced or have a preview.", this.settings.ignoreMessage, (i) => {
this.settings.ignoreMessage = i;
this.updateSettingsCSS()
}),
new Switch("Ignore attachment links", "Attachment links will not get replaced or have a preview. (Recommended when using HideEmbedLink for example)", this.settings.ignoreAttachment, (i) => {
this.settings.ignoreAttachment = i;
this.updateSettingsCSS()
}),
messageReplaceGroup,
attachmentReplaceGroup,
appearanceSettingsGroup,
)
}
updateSettingsCSS() {
let hideArray = [];
if (this.settings.ignoreMessage && this.settings.ignoreAttachment) {
hideArray.push("SettingsGroup");
}
else if (this.settings.ignoreMessage) {
hideArray.push("SettingsGroup.Message");
}
else if (this.settings.ignoreAttachment) {
hideArray.push("SettingsGroup.Attachment");
}
if (!this.settings.showGuildIcon) {
hideArray.push("Settings.noDisplayIfSameGuildSwitch");
}
let hideCss = hideArray.length > 0 ? hideArray.map(e => `.betterMessageLinks.${e}`).join(", ") + " {display:none;}" : "";
BdApi.injectCSS(config.info.name, customCSS + hideCss)
}
onStop() {
BdApi.clearCSS(config.info.name)
Patcher.unpatchAll(config.info.name);
}
}
})(global.ZeresPluginLibrary.buildPlugin(config));

View file

@ -0,0 +1,8 @@
{
"all": {
"settings": {
"addJumpTo": true,
"cloneToTheTop": true
}
}
}

View file

@ -0,0 +1,165 @@
/**
* @name BetterSearchPage
* @author DevilBro
* @authorId 278543574059057154
* @version 1.2.0
* @description Adds some extra Controls to the Search Results Page
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
* @website https://mwittrien.github.io/
* @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterSearchPage/
* @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Plugins/BetterSearchPage/BetterSearchPage.plugin.js
*/
module.exports = (_ => {
const config = {
"info": {
"name": "BetterSearchPage",
"author": "DevilBro",
"version": "1.2.0",
"description": "Adds some extra Controls to the Search Results Page"
},
"changeLog": {
"fixed": {
"Jump Input": "No longer adds jump input if there is only one page of search results"
}
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
getName () {return config.info.name;}
getAuthor () {return config.info.author;}
getVersion () {return config.info.version;}
getDescription () {return `The Library Plugin needed for ${config.info.name} is missing. Open the Plugin Settings to download it. \n\n${config.info.description}`;}
downloadLibrary () {
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
if (!e && b && r.statusCode == 200) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"}));
else BdApi.alert("Error", "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library");
});
}
load () {
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
if (!window.BDFDB_Global.downloadModal) {
window.BDFDB_Global.downloadModal = true;
BdApi.showConfirmationModal("Library Missing", `The Library Plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
onConfirm: _ => {
delete window.BDFDB_Global.downloadModal;
this.downloadLibrary();
}
});
}
if (!window.BDFDB_Global.pluginQueue.includes(config.info.name)) window.BDFDB_Global.pluginQueue.push(config.info.name);
}
start () {this.load();}
stop () {}
getSettingsPanel () {
let template = document.createElement("template");
template.innerHTML = `<div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${config.info.name} is missing.\nPlease click <a style="font-weight: 500;">Download Now</a> to install it.</div>`;
template.content.firstElementChild.querySelector("a").addEventListener("click", this.downloadLibrary);
return template.content.firstElementChild;
}
} : (([Plugin, BDFDB]) => {
var settings = {};
return class BetterSearchPage extends Plugin {
onLoad () {
this.defaults = {
settings: {
addJumpTo: {value: true, description: "Add a Jump to Input Field (press enter to Jump)"},
cloneToTheTop: {value: true, description: "Clone the controls to the top of the Results Page"}
}
};
this.patchedModules = {
after: {
SearchResultsInner: "default"
}
};
}
onStart () {
this.forceUpdateAll();
}
onStop () {
this.forceUpdateAll();
}
getSettingsPanel (collapseStates = {}) {
let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
type: "Switch",
plugin: this,
keys: ["settings", key],
label: this.defaults.settings[key].description,
value: settings[key]
}));
return settingsPanel = BDFDB.PluginUtils.createSettingsPanel(this, settingsItems);
}
onSettingsClosed (e) {
if (this.SettingsUpdated) {
delete this.SettingsUpdated;
this.forceUpdateAll();
}
}
forceUpdateAll () {
settings = BDFDB.DataUtils.get(this, "settings");
BDFDB.PatchUtils.forceAllUpdates(this);
}
processSearchResultsInner (e) {
if (e.instance.props.search) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "SearchPagination"});
if (index > -1) {
let currentPage = parseInt(Math.floor(e.instance.props.search.offset / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) + 1;
let maxPage = e.instance.props.search.totalResults > 5000 ? parseInt(Math.ceil(5000 / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) : parseInt(Math.ceil(e.instance.props.search.totalResults / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE));
children[index].props.totalResults = children[index].props.totalResults > 5000 ? 5000 : children[index].props.totalResults;
let pagination = children[index].type(children[index].props);
if (!pagination || maxPage < 2) return;
pagination.props.className = BDFDB.DOMUtils.formatClassName(pagination.props.className, BDFDB.disCN.pagination, BDFDB.disCN._bettersearchpagepagination, settings.addJumpTo && BDFDB.disCN.paginationmini);
if (settings.addJumpTo) {
pagination.props.children = [
pagination.props.children,
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
type: "number",
size: BDFDB.LibraryComponents.TextInput.Sizes.MINI,
value: currentPage,
min: 1,
max: maxPage,
onKeyDown: (event, instance) => {
if (event.which == 13) {
let page = instance.props.value < 1 ? 1 : (instance.props.value > maxPage ? maxPage : instance.props.value);
if (page < currentPage) BDFDB.LibraryModules.SearchPageUtils.searchPreviousPage(e.instance.props.searchId, (currentPage - page) * BDFDB.DiscordConstants.SEARCH_PAGE_SIZE);
else if (page > currentPage) BDFDB.LibraryModules.SearchPageUtils.searchNextPage(e.instance.props.searchId, (page - currentPage) * BDFDB.DiscordConstants.SEARCH_PAGE_SIZE);
}
}
})
].flat(10).filter(n => n);
}
children[index] = pagination;
if (settings.cloneToTheTop) {
let topPagination = BDFDB.ReactUtils.cloneElement(pagination);
topPagination.props.className = BDFDB.DOMUtils.formatClassName(topPagination.props.className, BDFDB.disCN.paginationtop);
children.unshift(topPagination);
}
pagination.props.className = BDFDB.DOMUtils.formatClassName(pagination.props.className, BDFDB.disCN.paginationbottom);
}
}
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.0.4",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.0.3",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,7 @@
{
"all": {
"sliders": {
"showPercentage": 0
}
}
}

View file

@ -0,0 +1,237 @@
/**
* @name CharCounter
* @author DevilBro
* @authorId 278543574059057154
* @version 1.6.0
* @description Adds a Character Counter to most Inputs
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
* @website https://mwittrien.github.io/
* @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CharCounter/
* @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Plugins/CharCounter/CharCounter.plugin.js
*/
module.exports = (_ => {
const config = {
"info": {
"name": "CharCounter",
"author": "DevilBro",
"version": "1.6.0",
"description": "Adds a Character Counter to most Inputs"
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
getName () {return config.info.name;}
getAuthor () {return config.info.author;}
getVersion () {return config.info.version;}
getDescription () {return `The Library Plugin needed for ${config.info.name} is missing. Open the Plugin Settings to download it. \n\n${config.info.description}`;}
downloadLibrary () {
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
if (!e && b && r.statusCode == 200) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"}));
else BdApi.alert("Error", "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library");
});
}
load () {
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
if (!window.BDFDB_Global.downloadModal) {
window.BDFDB_Global.downloadModal = true;
BdApi.showConfirmationModal("Library Missing", `The Library Plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
onConfirm: _ => {
delete window.BDFDB_Global.downloadModal;
this.downloadLibrary();
}
});
}
if (!window.BDFDB_Global.pluginQueue.includes(config.info.name)) window.BDFDB_Global.pluginQueue.push(config.info.name);
}
start () {this.load();}
stop () {}
getSettingsPanel () {
let template = document.createElement("template");
template.innerHTML = `<div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${config.info.name} is missing.\nPlease click <a style="font-weight: 500;">Download Now</a> to install it.</div>`;
template.content.firstElementChild.querySelector("a").addEventListener("click", this.downloadLibrary);
return template.content.firstElementChild;
}
} : (([Plugin, BDFDB]) => {
const maxLengths = {
nick: 32,
customstatus: 128,
popoutnote: 256,
profilenote: 256
};
const typeMap = {
normal: "chat",
sidebar: "chat",
thread_creation: "threadcreation",
form: "upload"
};
const nativeCounters = ["profile_bio_input"];
return class CharCounter extends Plugin {
onLoad () {
this.patchedModules = {
after: {
ChannelTextAreaContainer: "render",
Note: "render",
NicknameSection: "default",
CustomStatusModal: "render"
}
};
this.defaults = {
sliders: {
showPercentage: {value: 0, description: "Only shows Counter after certain % of Max Length is reached"}
}
};
this.css = `
${BDFDB.dotCN._charcountercounteradded} {
position: relative !important;
}
${BDFDB.dotCN._charcountercounter} {
display: block;
position: absolute;
font-size: 15px;
z-index: 10;
pointer-events: none;
}
${BDFDB.dotCN._charcounterchatcounter} {
right: 0;
bottom: -1.3em;
}
${BDFDB.dotCN._charcountereditcounter} {
right: 0;
bottom: -1.3em;
}
${BDFDB.dotCN._charcounterthreadcreationcounter} {
right: 0;
bottom: -1.1em;
}
${BDFDB.dotCN._charcounteruploadcounter} {
right: 0;
bottom: -1.0em;
}
${BDFDB.dotCN._charcounternickcounter} {
right: 0 !important;
top: -1.5em;
}
${BDFDB.dotCN._charcountercustomstatuscounter} {
right: 0 !important;
top: -1.5em;
}
${BDFDB.dotCN._charcounterpopoutnotecounter} {
right: 3px !important;
bottom: -8px !important;
font-size: 10px !important;
}
${BDFDB.dotCN._charcounterprofilenotecounter} {
right: 0 !important;
bottom: -10px !important;
font-size: 12px !important;
}
${BDFDB.dotCN.usernotetextarea}:not(:focus) ~ ${BDFDB.dotCN._charcountercounter} {
display: none;
}
`;
}
onStart () {
BDFDB.PatchUtils.forceAllUpdates(this);
}
onStop () {
BDFDB.PatchUtils.forceAllUpdates(this);
}
getSettingsPanel (collapseStates = {}) {
let settingsPanel;
return settingsPanel = BDFDB.PluginUtils.createSettingsPanel(this, {
collapseStates: collapseStates,
children: _ => {
let settingsItems = [];
for (let key in this.defaults.sliders) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
type: "Slider",
plugin: this,
keys: ["sliders", key],
basis: "30%",
label: this.defaults.sliders[key].description,
value: this.settings.sliders[key]
}));
return settingsItems;
}
});
}
onSettingsClosed () {
if (this.SettingsUpdated) {
delete this.SettingsUpdated;
BDFDB.PatchUtils.forceAllUpdates(this);
}
}
processChannelTextAreaContainer (e) {
let editorContainer = BDFDB.ReactUtils.findChild(e.returnvalue, {name: "ChannelEditorContainer"});
if (editorContainer && editorContainer.props.type && !editorContainer.props.disabled) {
if (!BDFDB.ArrayUtils.is(e.returnvalue.props.children)) e.returnvalue.props.children = [e.returnvalue.props.children];
this.injectCounter(e.returnvalue, e.returnvalue.props.children, editorContainer.props.type.analyticsName || editorContainer.props.type, BDFDB.dotCN.textarea);
}
}
processNote (e) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: ["TextAreaAutosize", "TextArea", "PlainTextArea"]});
if (index > -1) this.injectCounter(e.returnvalue, children, e.instance.props.className && e.instance.props.className.indexOf(BDFDB.disCN.usernotepopout) > -1 ? "popoutnote" : "profilenote", "textarea");
}
processNicknameSection (e) {
e.returnvalue.props.children = BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN._charcountercounteradded,
children: [
e.returnvalue.props.children,
BDFDB.ReactUtils.createElement("div", {
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.charcounter, BDFDB.disCN._charcountercounter, BDFDB.disCN._charcounternickcounter),
children: `${(e.instance.props.pendingNick || "").length}/${maxLengths.nick}`
})
].flat(10)
});
}
processCustomStatusModal (e) {
let formItem = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.emojiinputcontainer]]});
if (formItem) this.injectCounter(formItem, formItem.props.children, "customstatus", BDFDB.dotCN.input);
}
injectCounter (parent, children, type, refClass, parsing) {
if (!children || nativeCounters.indexOf(type) > -1) return;
if (parent.props.className) parent.props.className = BDFDB.DOMUtils.formatClassName(parent.props.className, BDFDB.disCN._charcountercounteradded);
else parent.props.children = BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN._charcountercounteradded,
children: parent.props.children
});
children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CharCounter, {
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN._charcountercounter, type && BDFDB.DiscordClasses[`_charcounter${typeMap[type] || type}counter`] && BDFDB.disCN[`_charcounter${typeMap[type] || type}counter`]),
refClass: refClass,
parsing: parsing,
max: maxLengths[type] || (BDFDB.LibraryModules.NitroUtils.canUseIncreasedMessageLength(BDFDB.UserUtils.me) ? BDFDB.DiscordConstants.MAX_MESSAGE_LENGTH_PREMIUM : BDFDB.DiscordConstants.MAX_MESSAGE_LENGTH),
showPercentage: this.settings.sliders.showPercentage,
onChange: instance => {
let node = BDFDB.ReactUtils.findDOMNode(instance);
let form = node && BDFDB.DOMUtils.getParent(BDFDB.dotCN.chatform, node);
if (form) {
let typing = form.querySelector(BDFDB.dotCN.typing);
if (typing) typing.style.setProperty("margin-right", `${BDFDB.DOMUtils.getWidth(node) + 10}px`);
}
}
}));
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.0.2",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,25 @@
{
"all": {
"dates": {
"timestampDate": {
"formatString": "$time $date",
"dateString": "$dd $monthS $yyyy",
"timeString": "$h:$mm:$ss"
},
"tooltipDate": {
"formatString": "$time $date",
"dateString": "$dd $monthS $yyyy",
"timeString": "$h:$mm:$ss"
}
},
"general": {
"showInChat": true,
"showInEmbed": true,
"showInMarkup": true,
"showInAuditLogs": true,
"changeForChat": true,
"changeForEdit": true,
"changeForMarkup": true
}
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.4.1",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,14 @@
{
"all": {
"dates": {
"creationDate": {}
},
"general": {
"displayText": true
},
"places": {
"userPopout": true,
"userProfile": true
}
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.2.5",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.2.0",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.0.7",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,121 @@
/**
* @name DoNotTrack
* @version 0.0.7
* @authorLink https://twitter.com/IAmZerebos
* @donate https://paypal.me/ZackRauen
* @patreon https://patreon.com/Zerebos
* @website https://github.com/rauenzi/BetterDiscordAddons/tree/master/Plugins/DoNotTrack
* @source https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/DoNotTrack/DoNotTrack.plugin.js
* @updateUrl https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/DoNotTrack/DoNotTrack.plugin.js
*/
/*@cc_on
@if (@_jscript)
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
var pathSelf = WScript.ScriptFullName;
// Put the user at ease by addressing them in the first person
shell.Popup("It looks like you've mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
shell.Popup("I'm in the correct folder already.", 0, "I'm already installed", 0x40);
} else if (!fs.FolderExists(pathPlugins)) {
shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
} else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
// Show the user where to put plugins in the future
shell.Exec("explorer " + pathPlugins);
shell.Popup("I'm installed!", 0, "Successfully installed", 0x40);
}
WScript.Quit();
@else@*/
module.exports = (() => {
const config = {info:{name:"DoNotTrack",authors:[{name:"Zerebos",discord_id:"249746236008169473",github_username:"rauenzi",twitter_username:"ZackRauen"}],version:"0.0.7",description:"Stops Discord from tracking everything you do like Sentry and Analytics.",github:"https://github.com/rauenzi/BetterDiscordAddons/tree/master/Plugins/DoNotTrack",github_raw:"https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/DoNotTrack/DoNotTrack.plugin.js"},changelog:[{title:"Fixes","type:":"fixed",items:["Fixed for Discord/BetterDiscord changes"]}],main:"index.js",defaultConfig:[{type:"switch",id:"stopProcessMonitor",name:"Stop Process Monitor",note:"This setting stops Discord from monitoring the processes on your PC and prevents your currently played game from showing.",value:true}]};
return !global.ZeresPluginLibrary ? class {
constructor() {this._config = config;}
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() {
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js");
await new Promise(r => require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r));
});
}
});
}
start() {}
stop() {}
} : (([Plugin, Api]) => {
const plugin = (Plugin, Api) => {
const {Patcher, WebpackModules, Modals, DiscordModules} = Api;
return class DoNotTrack extends Plugin {
onStart() {
const Analytics = WebpackModules.getByProps("AnalyticEventConfigs");
Patcher.instead(Analytics.default, "track", () => {});
const Logger = window.__SENTRY__.logger;
Logger.disable(); // Kill sentry logs
const SentryHub = window.DiscordSentry.getCurrentHub();
SentryHub.getClient().close(0); // Kill reporting
SentryHub.getStackTop().scope.clear(); // Delete PII
/* eslint-disable no-console */
for (const method in console) {
if (!console[method].__sentry_original__) continue;
console[method] = console[method].__sentry_original__;
}
if (this.settings.stopProcessMonitor) this.disableProcessMonitor();
}
onStop() {
Patcher.unpatchAll();
}
disableProcessMonitor() {
DiscordModules.UserSettingsUpdater.updateLocalSettings({showCurrentGame: false});
const NativeModule = WebpackModules.getByProps("getDiscordUtils");
const DiscordUtils = NativeModule.getDiscordUtils();
DiscordUtils.setObservedGamesCallback([], () => {});
}
enableProcessMonitor() {
DiscordModules.UserSettingsUpdater.updateLocalSettings({showCurrentGame: true});
Modals.showConfirmationModal("Reload Discord?", "To reenable the process monitor Discord needs to be reloaded.", {
confirmText: "Reload",
cancelText: "Later",
onConfirm: () => {
window.location.reload();
}
});
}
getSettingsPanel() {
const panel = this.buildSettingsPanel();
panel.addListener(this.updateSettings.bind(this));
return panel.getElement();
}
updateSettings(id, value) {
if (id !== "stopProcessMonitor") return;
if (value) return this.disableProcessMonitor();
return this.enableProcessMonitor();
}
};
};
return plugin(Plugin, Api);
})(global.ZeresPluginLibrary.buildPlugin(config));
})();
/*@end@*/

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.0.0",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,168 @@
/**
* @name DoubleClickVoiceChannels
* @description Requires you to double click voice channels to join them.
* @author Qb, Twizzer#0001 & AAGaming#9395
* @authorId 133659541198864384
* @version 1.0.0
* @invite pKx8m6Z
* @license Unlicensed
* @source https://github.com/QbDesu/BetterDiscordAddons/blob/potato/Plugins/DoubleClickVoiceChannels
* @updateUrl https://raw.githubusercontent.com/QbDesu/BetterDiscordAddons/potato/Plugins/DoubleClickVoiceChannels/DoubleClickVoiceChannels.plugin.js
*/
/*@cc_on
@if (@_jscript)
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\BetterDiscord\plugins");
var pathSelf = WScript.ScriptFullName;
// Put the user at ease by addressing them in the first person
shell.Popup("It looks like you've mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
shell.Popup("I'm in the correct folder already.", 0, "I'm already installed", 0x40);
} else if (!fs.FolderExists(pathPlugins)) {
shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
} else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
// Show the user where to put plugins in the future
shell.Exec("explorer " + pathPlugins);
shell.Popup("I'm installed!", 0, "Successfully installed", 0x40);
}
WScript.Quit();
@else@*/
module.exports = (() => {
const config = {
info: {
name: "DoubleClickVoiceChannels",
version: "1.0.0",
github_raw: "https://raw.githubusercontent.com/QbDesu/BetterDiscordAddons/potato/Plugins/DoubleClickVoiceChannels/DoubleClickVoiceChannels.plugin.js"
}
};
return !global.ZeresPluginLibrary ? class {
constructor() { this._config = config; }
load() {
BdApi.showConfirmationModal("Library plugin is needed",
[`The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`], {
confirmText: "Download",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://betterdiscord.app/Download?id=9");
await new Promise(r => {
require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r);
window.location.reload();
});
});
}
});
}
start() { }
stop() { }
}
: (([Plugin, Api]) => {
const plugin = (Plugin, Api) => {
const {
Patcher,
WebpackModules,
Logger
} = Api;
const ChannelItem = WebpackModules.getModule(m => m?.default?.displayName == "ChannelItem");
const ChannelMention = WebpackModules.getModule(m => m?.default?.displayName == "Mention");
return class GuildNotificationDefaults extends Plugin {
constructor() {
super();
// remove need for duplication of metadata fields
this.getAuthor = null;
this.getDescription = null;
}
async onStart() {
Patcher.after(ChannelItem, "default", (that, args, value) => {
const channel = this.getChannel(value);
if (channel) {
if (channel.type === 2 || channel.type === 13) {
const clickable = this.getClickable(value);
if (clickable) {
clickable.onDoubleClick = clickable.onClick;
delete clickable.onClick;
}
}
} else {
Logger.warn('Failed to find channel.');
}
return value;
});
Patcher.after(ChannelMention, "default", (that, args, value) => {
const label = this.getLabel(value);
if (label && label === 'Voice Channel') {
const { props } = value;
props.onDoubleClick = props.onClick;
delete props.onClick;
}
return value;
});
}
onStop() {
Patcher.unpatchAll();
}
shouldDescend(key) {
return key === 'props' || key === 'children' || !isNaN(key);
}
getChannel(obj) {
for (const key in obj) {
const inner = obj[key];
if (inner && typeof inner === 'object') {
if (key === 'channel') {
return inner;
} else if (this.shouldDescend(key)) {
return this.getChannel(inner);
}
}
}
return null;
}
getClickable(obj) {
for (const key in obj) {
const inner = obj[key];
if (inner && typeof inner === 'object') {
if (inner.onClick && inner.role === 'button') {
return inner;
} else if (this.shouldDescend(key)) {
return this.getClickable(inner);
}
}
}
return null;
}
getLabel(obj) {
for (const key in obj) {
const inner = obj[key];
if (inner) {
if (key === 'aria-label') {
return inner;
} else if (typeof inner === 'object' && this.shouldDescend(key)) {
return this.getLabel(inner);
}
}
}
return null;
}
};
};
return plugin(Plugin, Api);
})(global.ZeresPluginLibrary.buildPlugin(config));
})();
/*@end@*/

View file

@ -0,0 +1,26 @@
{
"all": {
"engines": {
"Ask": false,
"Bing": false,
"DogPile": false,
"DuckDuckGo": false,
"Ecosia": false,
"GitHub": true,
"Google": false,
"GoogleScholar": false,
"Quora": false,
"Qwant": false,
"Searx": false,
"StackOverflow": true,
"Startpage": false,
"UrbanDictionary": false,
"Whoogle": true,
"WolframAlpha": false,
"Yahoo": false,
"Yandex": false,
"YouTube": false,
"_all": true
}
}
}

View file

@ -0,0 +1,16 @@
{
"keybind": [
[
0,
37
],
[
0,
50
],
[
0,
19
]
]
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.0.7",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,59 @@
{
"all": {
"amounts": {
"hoverDelay": 0
},
"detailsSettings": {
"footnote": true,
"tooltip": false,
"tooltipDelay": 0
},
"engines": {
"_all": true,
"Baidu": true,
"Bing": true,
"Google": true,
"ImgOps": true,
"IQDB": true,
"Reddit": true,
"SauceNAO": true,
"Sogou": true,
"TinEye": true,
"WhatAnime": true,
"Yandex": true
},
"general": {
"resizeImage": true,
"addDetails": true,
"showInDescription": true,
"showOnHover": false,
"enableGallery": true,
"enableZoom": true,
"pixelZoom": false,
"enableCopyImg": true,
"enableSaveImg": true
},
"places": {
"userAvatars": true,
"groupIcons": true,
"guildIcons": true,
"emojis": true
},
"resizeSettings": {
"messages": false,
"imageViewer": false
},
"viewerSettings": {
"zoomMode": true,
"galleryMode": true,
"details": true,
"copyImage": true,
"saveImage": true
},
"zoomSettings": {
"lensSize": 200,
"pixelMode": false,
"zoomLevel": 2
}
}
}

View file

@ -0,0 +1,14 @@
{
"all": {
"dates": {
"joinedAtDate": {}
},
"general": {
"displayText": true
},
"places": {
"userPopout": true,
"userProfile": true
}
}
}

View file

@ -0,0 +1,109 @@
/**
* @name OpenSteamLinksInApp
* @author DevilBro
* @authorId 278543574059057154
* @version 1.1.4
* @description Opens Steam Links in Steam instead of your Browser
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
* @website https://mwittrien.github.io/
* @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/OpenSteamLinksInApp/
* @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Plugins/OpenSteamLinksInApp/OpenSteamLinksInApp.plugin.js
*/
module.exports = (_ => {
const config = {
"info": {
"name": "OpenSteamLinksInApp",
"author": "DevilBro",
"version": "1.1.4",
"description": "Opens Steam Links in Steam instead of your Browser"
},
"changeLog": {
"fixed": {
"Zoomable Images": "No longer tries to open zoomable Images inside Steam"
}
}
};
return (window.Lightcord && !Node.prototype.isPrototypeOf(window.Lightcord) || window.LightCord && !Node.prototype.isPrototypeOf(window.LightCord) || window.Astra && !Node.prototype.isPrototypeOf(window.Astra)) ? class {
getName () {return config.info.name;}
getAuthor () {return config.info.author;}
getVersion () {return config.info.version;}
getDescription () {return "Do not use LightCord!";}
load () {BdApi.alert("Attention!", "By using LightCord you are risking your Discord Account, due to using a 3rd Party Client. Switch to an official Discord Client (https://discord.com/) with the proper BD Injection (https://betterdiscord.app/)");}
start() {}
stop() {}
} : !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
getName () {return config.info.name;}
getAuthor () {return config.info.author;}
getVersion () {return config.info.version;}
getDescription () {return `The Library Plugin needed for ${config.info.name} is missing. Open the Plugin Settings to download it. \n\n${config.info.description}`;}
downloadLibrary () {
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
if (!e && b && r.statusCode == 200) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"}));
else BdApi.alert("Error", "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library");
});
}
load () {
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
if (!window.BDFDB_Global.downloadModal) {
window.BDFDB_Global.downloadModal = true;
BdApi.showConfirmationModal("Library Missing", `The Library Plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
onConfirm: _ => {
delete window.BDFDB_Global.downloadModal;
this.downloadLibrary();
}
});
}
if (!window.BDFDB_Global.pluginQueue.includes(config.info.name)) window.BDFDB_Global.pluginQueue.push(config.info.name);
}
start () {this.load();}
stop () {}
getSettingsPanel () {
let template = document.createElement("template");
template.innerHTML = `<div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${config.info.name} is missing.\nPlease click <a style="font-weight: 500;">Download Now</a> to install it.</div>`;
template.content.firstElementChild.querySelector("a").addEventListener("click", this.downloadLibrary);
return template.content.firstElementChild;
}
} : (([Plugin, BDFDB]) => {
const urls = {
steam: ["https://steamcommunity.", "https://help.steampowered.", "https://store.steampowered.", "https://s.team/", "a.akamaihd.net/"]
};
return class OpenSteamLinksInApp extends Plugin {
onLoad () {}
onStart () {
for (let key in urls) BDFDB.ListenerUtils.add(this, document, "click", BDFDB.ArrayUtils.removeCopies(urls[key].map(url => url.indexOf("http") == 0 ? (url.indexOf("https://") == 0 ? [`a[href^="${url}"]`, `a[href^="${url.replace(/https:\/\//i, "http://")}"]`] : `a[href^="${url}"]`) : `a[href*="${url}"][href*="${key}"]`).flat(10).filter(n => n)).join(", "), e => {
if (!(e.currentTarget.className && e.currentTarget.className.indexOf(BDFDB.disCN.imagezoom) > -1)) this.openIn(e, key, e.currentTarget.href);
});
}
onStop () {}
openIn (e, key, url) {
let platform = BDFDB.LibraryModules.StringUtils.upperCaseFirstChar(key);
if (url && !url.startsWith("https://images-ext-1.discord") && !url.startsWith("https://images-ext-2.discord") && typeof this[`openIn${platform}`] == "function") {
BDFDB.ListenerUtils.stopEvent(e);
this[`openIn${platform}`](url);
return true;
}
return false;
}
openInSteam (url) {
BDFDB.LibraryRequires.request(url, (error, response, body) => {
if (BDFDB.LibraryRequires.electron.shell.openExternal("steam://openurl/" + response.request.href));
else BDFDB.DiscordUtils.openLink(response.request.href);
});
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.2.2",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.2.2",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,16 @@
{
"all": {
"cached": "2 7 8 9 11 14 15 17 28 29 30 31 59 60 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 116 120 122 126 127 131 132 133 134 137 138 139 146 157 158 159 160 162 164 171 173 176 179 181 182 183 184 185 186 188 189 190 192 193 195 196 197 200 201 206 220 228 234 236 237 238 240 245 247 253 262 272 274 278 284 287 291 292 293 295 301 306 312 314 317 318 323 331 336 337 338 340 344 349 350 351 352 353 354 356 361 364 366 368 370 377 379 381 382 383 390 395 398 401 404 407 420 421 429 438 441 442 476 479 489 509 518 519 520 521 523 525 534 535 538 539 547 554 557 566 577 579 589 592 593 598 599 606 608 611 614 620 621 627 638 644 645 670 671 686 692 694",
"filters": {
"updated": true,
"outdated": true,
"downloadable": true
},
"general": {
"notifyOutdated": true,
"notifyNewEntries": true,
"startDownloaded": false,
"startUpdated": false
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.2.1",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "1.0.0",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,28 @@
{
"all": {
"amounts": {
"tooltipDelay": 0,
"tooltipWidth": 300
},
"colors": {
"tooltipColor": ""
},
"dates": {
"tooltipDates": {}
},
"general": {
"onlyShowOnShift": false
},
"items": {
"icon": true,
"owner": true,
"creationDate": true,
"joinDate": true,
"members": true,
"channels": true,
"roles": true,
"boosts": true,
"language": true
}
}
}

View file

@ -0,0 +1,13 @@
{
"all": {
"general": {
"closeOtherFolders": false,
"closeTheFolder": false,
"closeAllFolders": false,
"forceOpenFolder": false,
"showCountBadge": true,
"extraColumn": true,
"addSeparators": true
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
{
"connections": {
"battlenet": true,
"facebook": true,
"github": true,
"leagueoflegends": true,
"playstation": true,
"reddit": true,
"samsung": true,
"skype": true,
"spotify": true,
"steam": true,
"twitch": true,
"twitter": true,
"xbox": true,
"youtube": true
},
"general": {
"useColoredIcons": true,
"useColoredTooltips": true,
"placeAtTop": false,
"showVerifiedBadge": true,
"openWebpage": true
}
}

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "0.0.1",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,96 @@
//META{"name":"ShutUpClyde","displayName":"ShutUpClyde"}*//
/*@cc_on
@if (@_jscript)
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\BetterDiscord\plugins");
var pathSelf = WScript.ScriptFullName;
// Put the user at ease by addressing them in the first person
shell.Popup("It looks like you've mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
shell.Popup("I'm in the correct folder already.", 0, "I'm already installed", 0x40);
} else if (!fs.FolderExists(pathPlugins)) {
shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
} else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
// Show the user where to put plugins in the future
shell.Exec("explorer " + pathPlugins);
shell.Popup("I'm installed!", 0, "Successfully installed", 0x40);
}
WScript.Quit();
@else@*/
module.exports = (() => {
const config = {
info: {
name: "ShutUpClyde",
authors: [
{
name: "Strencher",
discord_id: "415849376598982656",
github_username: "Strencher",
twitter_username: "Strencher3"
}
],
version: "0.0.1",
description: "Prevents Clyde from disturbing you.",
github: "https://github.com/Strencher/BetterDiscordStuff/ShutUpClyde/ShutUpClyde.plugin.js",
github_raw: "https://raw.githubusercontent.com/Strencher/BetterDiscordStuff/master/ShutUpClyde/ShutUpClyde.plugin.js"
},
changelog: [
{
title: "Yeah",
type: "added",
items: ["The plugin exist"]
}
]
};
return !global.ZeresPluginLibrary ? class {
constructor() { this._config = config; }
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() {
BdApi.showConfirmationModal("Library plugin is needed",
[`The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`], {
confirmText: "Download",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js");
await new Promise(r => require("fs").writeFile(require("path").join(ContentManager.pluginsFolder, "0PluginLibrary.plugin.js"), body, r));
});
}
});
}
start() { }
stop() { }
} : (([Plugin, Api]) => {
const plugin = (Plugin, Api) => {
const { WebpackModules, DiscordModules, Patcher } = Api;
return class ShutUpClyde extends Plugin {
constructor() {
super();
}
onStart() {
Patcher.instead(DiscordModules.MessageActions, "sendBotMessage", () => {})
Patcher.instead(WebpackModules.getByProps("sendClydeError"), "sendClydeError", () => {})
}
onStop() {
Patcher.unpatchAll()
}
}
};
return plugin(Plugin, Api);
})(global.ZeresPluginLibrary.buildPlugin(config));
})();
/*@end@*/

View file

@ -0,0 +1,16 @@
{
"all": {
"cached": "1 3 4 16 18 22 23 26 32 33 39 40 41 45 46 47 48 49 52 53 56 112 124 125 140 142 144 147 153 155 156 161 166 172 174 177 204 205 209 211 212 213 216 218 222 226 231 233 252 256 257 258 286 296 300 308 315 320 329 342 359 362 369 371 374 384 385 394 399 405 411 412 422 439 468 482 483 485 507 508 515 517 530 541 553 572 576 580 581 597 601 607 613 626 636 637 641 642 643 653 659 662 664 665 695 712 713 714 719 733 734 735 737",
"filters": {
"updated": true,
"outdated": true,
"downloadable": true
},
"general": {
"notifyOutdated": true,
"notifyNewEntries": true,
"startDownloaded": false,
"startUpdated": false
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,268 @@
/**
* @name ThemeSettings
* @author DevilBro
* @authorId 278543574059057154
* @version 1.3.4
* @description Allows you to change Theme Variables within Discord. Adds a Settings button (similar to Plugins) to customizable Themes in your Themes Page
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
* @website https://mwittrien.github.io/
* @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ThemeSettings/
* @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Plugins/ThemeSettings/ThemeSettings.plugin.js
*/
module.exports = (_ => {
const config = {
"info": {
"name": "ThemeSettings",
"author": "DevilBro",
"version": "1.3.4",
"description": "Allows you to change Theme Variables within Discord. Adds a Settings button (similar to Plugins) to customizable Themes in your Themes Page"
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
getName () {return config.info.name;}
getAuthor () {return config.info.author;}
getVersion () {return config.info.version;}
getDescription () {return `The Library Plugin needed for ${config.info.name} is missing. Open the Plugin Settings to download it. \n\n${config.info.description}`;}
downloadLibrary () {
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
if (!e && b && r.statusCode == 200) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"}));
else BdApi.alert("Error", "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library");
});
}
load () {
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
if (!window.BDFDB_Global.downloadModal) {
window.BDFDB_Global.downloadModal = true;
BdApi.showConfirmationModal("Library Missing", `The Library Plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
onConfirm: _ => {
delete window.BDFDB_Global.downloadModal;
this.downloadLibrary();
}
});
}
if (!window.BDFDB_Global.pluginQueue.includes(config.info.name)) window.BDFDB_Global.pluginQueue.push(config.info.name);
}
start () {this.load();}
stop () {}
getSettingsPanel () {
let template = document.createElement("template");
template.innerHTML = `<div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${config.info.name} is missing.\nPlease click <a style="font-weight: 500;">Download Now</a> to install it.</div>`;
template.content.firstElementChild.querySelector("a").addEventListener("click", this.downloadLibrary);
return template.content.firstElementChild;
}
} : (([Plugin, BDFDB]) => {
var dir;
return class ThemeSettings extends Plugin {
onLoad () {
dir = BDFDB.BDUtils.getThemesFolder();
this.patchedModules = {
after: {
SettingsView: "componentDidMount"
}
};
}
onStart () {
for (let settingsView of document.querySelectorAll(BDFDB.dotCN.layer + BDFDB.dotCN.settingswindowstandardsidebarview)) this.addListObserver(BDFDB.DOMUtils.getParent(BDFDB.dotCN.layer, settingsView));
BDFDB.ReactUtils.forceUpdate(this);
}
onStop () {
BDFDB.DOMUtils.remove(BDFDB.dotCN._themesettingsbutton);
}
processSettingsView (e) {
this.addListObserver(BDFDB.DOMUtils.getParent(BDFDB.dotCN.layer, e.node));
}
addListObserver (layer) {
if (!layer) return;
BDFDB.ObserverUtils.connect(this, layer, {name: "cardObserver", instance: new MutationObserver(changes => changes.forEach(change => change.addedNodes.forEach(node => {
if (BDFDB.DOMUtils.containsClass(node, BDFDB.disCN._repocard)) this.appendSettingsButton(node);
if (node.nodeType != Node.TEXT_NODE) for (let child of node.querySelectorAll(BDFDB.dotCN._repocard)) this.appendSettingsButton(child);
})))}, {childList: true, subtree: true});
for (let child of layer.querySelectorAll(BDFDB.dotCN._repocard)) this.appendSettingsButton(child);
}
appendSettingsButton (card) {
if (card.querySelector(BDFDB.dotCN._themesettingsbutton)) return;
let addon = BDFDB.ObjectUtils.get(BDFDB.ReactUtils.getInstance(card), "return.stateNode.props.addon");
if (addon && !addon.plugin && !addon.instance && addon.css) {
let css = addon.css.replace(/\r/g, "");
let imports = css.split("\n@import url(").splice(1).map(n => [n.split(");")[0], true]).concat(css.split("\n/* @import url(").splice(1).map(n => [n.split("); */")[0], false]));
let vars = css.split(":root");
if (vars.length > 1) {
vars = vars[1].replace(/\t\(/g, " (").replace(/\t| {2,}/g, "").replace(/\/\*\n*((?!\/\*|\*\/).|\n)*\n+((?!\/\*|\*\/).|\n)*\n*\*\//g, "").replace(/\n\/\*.*?\*\//g, "").replace(/\n/g, "");
vars = vars.split("{");
vars.shift();
vars = vars.join("{").replace(/\s*(:|;|--|\*)\s*/g, "$1");
vars = vars.split("}")[0];
vars = (vars.endsWith(";") ? vars.slice(0, -1) : vars).slice(2).split(/;--|\*\/--/);
}
else vars = [];
if (imports.length || vars.length) {
let footerControls = card.querySelector(BDFDB.dotCNS._repofooter + BDFDB.dotCN._repocontrols);
let settingsButton = document.createElement("button");
settingsButton.className = BDFDB.DOMUtils.formatClassName(BDFDB.disCN._repobutton, BDFDB.disCN._repocontrolsbutton, BDFDB.disCN._themesettingsbutton);
settingsButton.appendChild(BDFDB.DOMUtils.create(`<svg viewBox="0 0 20 20" style="width: 20px; height: 20px;"><path fill="none" d="M0 0h20v20H0V0z"></path><path d="M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"></path></svg>`));
footerControls.insertBefore(settingsButton, footerControls.firstElementChild);
settingsButton.addEventListener("click", _ => {
let importInstances = {}, inputInstances = {};
BDFDB.ModalUtils.open(this, {
header: `${addon.name} ${BDFDB.LanguageUtils.LanguageStrings.SETTINGS}`,
subHeader: "",
className: BDFDB.disCN._repomodal,
headerClassName: BDFDB.disCN._repomodalheader,
contentClassName: BDFDB.disCN._repomodalsettings,
footerClassName: BDFDB.disCN._repomodalfooter,
size: "MEDIUM",
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanel, {
addon: addon,
children: _ => {
let settingsItems = [];
let varInputs = [];
for (let i in vars) {
let varStr = vars[i].split(":");
let varName = varStr.shift().trim();
varStr = varStr.join(":").split(/;[^A-z0-9]|\/\*/);
let varValue = varStr.shift().trim();
if (varValue) {
let childType = "text", childMode = "";
let isColor = BDFDB.ColorUtils.getType(varValue);
let isComp = !isColor && /^[0-9 ]+,[0-9 ]+,[0-9 ]+$/g.test(varValue);
if (isColor || isComp) {
childType = "color";
childMode = isComp && "comp";
}
else {
let isUrlFile = /url\(.+\)/gi.test(varValue);
let isFile = !isUrlFile && /(http(s)?):\/\/[(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/.test(varValue);
if (isFile || isUrlFile) {
childType = "file";
childMode = isUrlFile && "url";
}
}
let varDescription = varStr.join("").replace(/\*\/|\/\*/g, "").replace(/:/g, ": ").replace(/: \//g, ":/").replace(/--/g, " --").replace(/\( --/g, "(--").trim();
varInputs.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "TextInput",
margin: 8,
childProps: {
type: childType,
mode: childMode,
filter: childType == "file" && "image",
ref: instance => {if (instance) inputInstances[i] = instance;}
},
label: varName.split("-").map(BDFDB.LibraryModules.StringUtils.upperCaseFirstChar).join(" "),
note: varDescription && varDescription.indexOf("*") == 0 ? varDescription.slice(1) : varDescription,
basis: "70%",
name: varName,
value: varValue,
oldValue: varValue,
defaultValue: varValue,
placeholder: varValue
}));
}
};
if (imports.length) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelList, {
title: "Imports:",
dividerBottom: varInputs.length,
children: imports.map((impo, i) => {
let name = impo[0].split("/").pop().replace(/"/g, "");
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch",
margin: 8,
childProps: {ref: instance => {if (instance) importInstances[i] = instance;}},
label: name[0].toUpperCase() + name.slice(1),
note: impo[0].replace(/"/g, ""),
name: impo[0],
value: impo[1],
oldValue: impo[1].toString(),
defaultValue: impo[1].toString()
});
})
}));
if (varInputs.length) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelList, {
title: "Variables:",
children: varInputs
}));
return settingsItems;
}
}),
buttons: [{
contents: BDFDB.LanguageUtils.LanguageStrings.SAVE,
color: "BRAND",
onClick: _ => this.updateTheme(addon, {imports: importInstances, inputs: inputInstances}, false)
}, {
contents: BDFDB.LanguageUtils.LanguageStrings.RESET,
look: "LINK",
onClick: _ => this.updateTheme(addon, {imports: importInstances, inputs: inputInstances}, true)
}]
});
});
settingsButton.addEventListener("mouseenter", _ => {
BDFDB.TooltipUtils.create(settingsButton, BDFDB.LanguageUtils.LanguageStrings.SETTINGS);
});
}
}
}
updateTheme (addon, instances, reset) {
let path = BDFDB.LibraryRequires.path.join(dir, addon.filename);
let css = BDFDB.LibraryRequires.fs.readFileSync(path).toString();
if (css) {
let amount = 0;
for (let i in instances.imports) {
let input = instances.imports[i];
let oldValue = input.props.oldValue;
let newValue = reset ? input.props.defaultValue : input.props.value;
if (newValue.toString() != oldValue.toString()) {
let trueValue = typeof newValue == "string" ? newValue == "true" : newValue;
let importUrl = input.props.name;
if (trueValue) css = css.replace(new RegExp(`\\n${BDFDB.StringUtils.regEscape("/* @import url(" + importUrl + "); */")}`, "g"), `\n@import url(${importUrl});`);
else css = css.replace(new RegExp(`\\n${BDFDB.StringUtils.regEscape("@import url(" + importUrl + ");")}`, "g"), `\n/* @import url(${importUrl}); */`);
input.props.value = trueValue;
input.props.oldValue = newValue;
amount++;
}
}
for (let i in instances.inputs) {
let input = instances.inputs[i];
let oldValue = input.props.oldValue;
let newValue = reset ? input.props.defaultValue : input.props.value;
if (newValue && newValue.trim() && newValue != oldValue) {
let varName = input.props.name;
css = css.replace(new RegExp(`--${BDFDB.StringUtils.regEscape(varName)}(\\s*):(\\s*)${BDFDB.StringUtils.regEscape(oldValue)}`,"g"), `--${varName}$1: $2${newValue}`);
input.props.value = newValue;
input.props.oldValue = newValue;
input.props.placeholder = newValue;
amount++;
}
}
if (amount > 0) {
BDFDB.ReactUtils.forceUpdate(BDFDB.ObjectUtils.toArray(instances.imports), BDFDB.ObjectUtils.toArray(instances.inputs));
BDFDB.LibraryRequires.fs.writeFileSync(path, css);
BDFDB.NotificationUtils.toast(`Updated ${amount} Variable${amount == 1 ? "" : "s"} in '${addon.filename}'`, {type: "success"});
}
else BDFDB.NotificationUtils.toast(`There are no changed Variables to be updated in '${addon.filename}'`, {type: "warning"});
}
else BDFDB.NotificationUtils.toast(`Could not find Theme File '${addon.filename}'`, {type: "danger"});
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();

View file

@ -0,0 +1,7 @@
{
"didShowIssueHelperPopup": true,
"currentVersionInfo": {
"version": "0.5.4",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,342 @@
/**
* @name TypingIndicator
* @displayName TypingIndicator
* @website https://twitter.com/l0c4lh057/
* @source https://github.com/l0c4lh057/BetterDiscordStuff/blob/master/Plugins/TypingIndicator/TypingIndicator.plugin.js
* @patreon https://www.patreon.com/l0c4lh057
* @invite YzzeuJPpyj
* @authorId 226677096091484160
*/
module.exports = (() => {
const config = {
info:{
name: "TypingIndicator",
authors: [{name: "l0c4lh057", github_username: "l0c4lh057", twitter_username: "l0c4lh057", discord_id: "226677096091484160"}],
description: "Shows an indicator in the guild/channel list when someone is typing there",
version: "0.5.4",
github: "https://github.com/l0c4lh057/BetterDiscordStuff/blob/master/Plugins/TypingIndicator/",
github_raw: "https://raw.githubusercontent.com/l0c4lh057/BetterDiscordStuff/master/Plugins/TypingIndicator/TypingIndicator.plugin.js"
},
defaultConfig: [
{
type: "switch",
id: "channels",
name: "Show on channels",
note: "With this option enabled all channels have the typing indicator when someone is typing in them (default: true)",
value: true
},
{
type: "switch",
id: "includeMuted",
name: "Include muted channels/guilds",
note: "With this option enabled even muted channels have the typing indicator (default: false)",
value: false
},
{
type: "switch",
id: "includeBlocked",
name: "Include blocked users",
note: "With this option enabled the indicator will also show for users you have blocked (default: false)",
value: false
},
{
type: "switch",
id: "guilds",
name: "Show on guilds",
note: "With this option enabled the indicator is shown on guild icons when someone is typing in any of the channels of it (default: false)",
value: false
},
{
type: "switch",
id: "folders",
name: "Show on folders",
note: "With this option enabled the indicator is shown on discord native guild folders when someone is typing in any of the guilds (default: false)",
value: false
},
{
type: "switch",
id: "dms",
name: "Show on home icon",
note: "With this option enabled the indicator is shown on the home icon above the guild list (default: false)",
value: false
}
],
changelog:[
{
"title": "Fixed",
"type": "fixed",
"items": ["Indicator visible again when using light theme (those were the worst two minutes of this year, even with my health issues rn)"]
}
]
};
return !global.ZeresPluginLibrary ? class {
constructor(){this._config = config;}
getName(){return config.info.name;}
getAuthor(){return config.info.authors.map(a => a.name).join(", ");}
getDescription(){return config.info.description + " **Install [ZeresPluginLibrary](https://betterdiscord.app/Download?id=9) and restart discord to use this plugin!**";}
getVersion(){return config.info.version;}
load(){
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`, {
confirmText: "Download Now",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://betterdiscord.app/Download?id=9");
await new Promise(r => require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r));
});
}
});
}
start(){}
stop(){}
} : (([Plugin, Api]) => {
const plugin = (Plugin, Api) => {
const { WebpackModules, DiscordModules, Patcher, ReactComponents, PluginUtilities, Utilities, ReactTools, Logger } = Api;
const { React, ChannelStore, UserStore, UserTypingStore, RelationshipStore, SelectedGuildStore, DiscordConstants, WindowInfo } = DiscordModules;
const Flux = WebpackModules.getByProps("connectStores");
const FluxUtils = WebpackModules.getByProps("useStateFromStores");
const MutedStore = WebpackModules.getByProps("isMuted", "isChannelMuted");
const Spinner = WebpackModules.getByDisplayName("Spinner");
const Tooltip = WebpackModules.getByDisplayName("Tooltip");
if(!BdApi.Plugins.get("BugReportHelper") && !BdApi.getData(config.info.name, "didShowIssueHelperPopup")){
BdApi.saveData(config.info.name, "didShowIssueHelperPopup", true);
BdApi.showConfirmationModal("Do you want to download a helper plugin?", `Do you want to download a helper plugin that makes it easier for you to report issues? That plugin is not needed to anything else to function correctly but nice to have when reporting iissues, shortening the time until the problem gets resolved by asking you for specific information and also including additional information you did not provide.`, {
confirmText: "Download",
cancelText: "Cancel",
onConfirm: () => {
require("request").get("https://raw.githubusercontent.com/l0c4lh057/BetterDiscordStuff/master/Plugins/BugReportHelper/BugReportHelper.plugin.js", (error, response, body) => {
if (error) return require("electron").shell.openExternal("https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/l0c4lh057/BetterDiscordStuff/master/Plugins/BugReportHelper/BugReportHelper.plugin.js");
else require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "BugReportHelper.plugin.js"), body, ()=>{
window.setTimeout(()=>BdApi.Plugins.enable("BugReportHelper"), 1000);
});
});
}
});
}
const renderElement = ({userIds, opacity, type, isFocused, id})=>{
userIds = [...new Set(userIds)];
if(userIds.length === 0) return null;
const usernames = userIds.map(userId => UserStore.getUser(userId)).filter(user => user).map(user => user.tag);
const remainingUserCount = userIds.length - usernames.length;
const text = (()=>{
if(usernames.length === 0){
return `${remainingUserCount} user${remainingUserCount > 1 ? "s" : ""}`;
}else if(userIds.length > 2){
const otherCount = usernames.length - 1 + remainingUserCount;
return `${usernames[0]} and ${otherCount} other${otherCount > 1 ? "s" : ""}`;
}else if(remainingUserCount === 0){
return usernames.join(", ");
}else{
return `${usernames.join(", ")} and ${remainingUserCount} other${remainingUserCount > 1 ? "s" : ""}`;
}
})();
return React.createElement(
Tooltip,
{
text,
position: type === "channel" ? "top" : "right"
},
tooltipProps => React.createElement(Spinner, {
...tooltipProps,
type: "pulsingEllipsis",
className: `ti-indicator typingindicator-${type}`,
[`data-${type}-id`]: id,
animated: isFocused,
style: {
marginLeft: 5,
opacity: opacity
}
})
);
}
return class TypingIndicator extends Plugin {
onStart(){
PluginUtilities.addStyle("typingindicator-css", `
.typingindicator-guild, .typingindicator-dms, .typingindicator-folder {
position: absolute;
bottom: 0;
padding: 3px;
border-radius: 6px;
background-color: var(--background-tertiary);
right: 14px;
}
.ti-indicator span.pulsingEllipsisItem-3pNmEc {
background-color: var(--channels-default);
}
.ti-indicator .pulsingEllipsis-3YiXRF {
width: 22px;
}
.ti-indicator .pulsingEllipsisItem-3pNmEc:nth-of-type(3) {
margin-right: 0;
}
`);
this.promises = {state:{cancelled: false}, cancel(){this.state.cancelled = true;}};
this.patchChannelList();
this.patchGuildList(this.promises.state);
this.patchHomeIcon(this.promises.state);
this.patchFolders(this.promises.state);
}
onStop(){
PluginUtilities.removeStyle("typingindicator-css");
this.promises.cancel();
Patcher.unpatchAll();
}
getGuildChannels(...guildIds){
const channels = ChannelStore.getGuildChannels ? Object.values(ChannelStore.getGuildChannels()) : ChannelStore.getMutableGuildChannels ? Object.values(ChannelStore.getMutableGuildChannels()) : [];
return channels.filter(c => guildIds.includes(c.guild_id) && c.type !== DiscordConstants.ChannelTypes.GUILD_VOICE && c.type !== DiscordConstants.ChannelTypes.GUILD_CATEGORY);
}
getPrivateChannels(){
return ChannelStore.getPrivateChannels ? Object.values(ChannelStore.getPrivateChannels()) : ChannelStore.getMutablePrivateChannels ? Object.values(ChannelStore.getMutablePrivateChannels()) : [];
}
patchChannelList(){
const ChannelItem = WebpackModules.getModule(m => Object(m.default).displayName==="ChannelItem");
Patcher.after(ChannelItem, "default", (_, [props], returnValue) => {
if(props.channel.type!==DiscordConstants.ChannelTypes.GUILD_TEXT) return;
if(props.selected) return;
if(props.muted && !this.settings.includeMuted) return;
const selfId = UserStore.getCurrentUser()?.id;
if(!selfId) return setTimeout(()=>this.patchChannelList(), 100);
const fluxWrapper = Flux.connectStores([UserTypingStore, WindowInfo], ()=>({userIds: Object.keys(UserTypingStore.getTypingUsers(props.channel.id))
.filter(uId => (uId !== selfId) && (this.settings.includeBlocked || !RelationshipStore.isBlocked(uId)))
}));
const wrappedCount = fluxWrapper(({userIds}) => {
return React.createElement(renderElement, {userIds, opacity: 0.7, type: "channel", isFocused: WindowInfo.isFocused(), id: props.channel.id});
});
const itemList = Utilities.getNestedProp(returnValue, "props.children.props.children.1.props");
if(itemList) itemList.children = [...(Array.isArray(itemList.children) ? itemList.children : [itemList.children]), React.createElement(wrappedCount)];
});
}
onAdded(selector, callback) {
if (document.body.querySelector(selector)) return callback(document.body.querySelector(selector));
const observer = new MutationObserver((mutations) => {
for (let m = 0; m < mutations.length; m++) {
for (let i = 0; i < mutations[m].addedNodes.length; i++) {
const mutation = mutations[m].addedNodes[i];
if (mutation.nodeType === 3) continue; // ignore text
const directMatch = mutation.matches(selector) && mutation;
const childrenMatch = mutation.querySelector(selector);
if (directMatch || childrenMatch) {
observer.disconnect();
return callback(directMatch ?? childrenMatch);
}
}
}
});
observer.observe(document.body, {subtree: true, childList: true});
return () => {observer.disconnect();};
}
async forceUpdateGuilds(promiseState) {
document.getElementsByClassName("scroller-1Bvpku none-2Eo-qx scrollerBase-289Jih")[0]?.dispatchEvent(new CustomEvent("scroll"));
}
// this still doesnt work but it was an attempt to fix it and im too lazy to undo it for release
patchGuildList(promiseState){
const GuildComponents = WebpackModules.getModule(m => m?.default?.displayName === "GuildNode");
if (!GuildComponents || typeof GuildComponents.default !== "function") return console.error("[TypingIndicator] Could not find Guild components");
const selfId = UserStore.getCurrentUser()?.id;
if(!selfId) return setTimeout(()=>this.patchGuildList(promiseState), 100);
const Indicator = guildId => {
const props = FluxUtils.useStateFromStoresObject([UserStore, RelationshipStore, WindowInfo, UserTypingStore, MutedStore, UserStore], () => {
const selfId = UserStore.getCurrentUser().id;
return {
userIds: this.getGuildChannels(guildId)
.filter(channel => this.settings.includeMuted || !MutedStore.isChannelMuted(channel.guild_id, channel.id))
.flatMap(channel => Object.keys(UserTypingStore.getTypingUsers(channel.id)))
.filter(userId => (userId !== selfId) && (this.settings.includeBlocked || !RelationshipStore.isBlocked(userId))),
isFocused: WindowInfo.isFocused()
};
});
return React.createElement(renderElement, {...props, opacity: 1, id: guildId, type: "guild"});
};
const PatchedGuild = ({__TI_original, ...props}) => {
const returnValue = __TI_original(props);
try{
if(props.selected) return returnValue;
if(!this.settings.guilds) return returnValue;
if(!props.guild) return returnValue;
if(MutedStore.isMuted(props.guild.id) && !this.settings.includeMuted) return returnValue;
returnValue.props.children.props.children.push(Indicator({guildId: props.guild.id}));
}catch(err){
Logger.error("Error in Guild patch", err);
}
return returnValue;
}
Patcher.after(GuildComponents, "default", (_, [args], returnValue)=>{
const original = returnValue.type;
returnValue.type = PatchedGuild;
returnValue.props.__TI_original = original;
});
this.forceUpdateGuilds(promiseState);
}
async patchHomeIcon(promiseState){
const Home = await ReactComponents.getComponentByName("TutorialIndicator", "." + WebpackModules.getByProps("badgeIcon", "circleIcon", "listItem", "pill").listItem.replace(/ /g, "."));
if(promiseState.cancelled) return;
const selfId = UserStore.getCurrentUser()?.id;
if(!selfId) return setTimeout(()=>this.patchHomeIcon(promiseState), 100);
Patcher.after(Home.component.prototype, "render", (thisObject, _, returnValue) => {
if(!returnValue.props.children) return;
let children = returnValue.props.children[0] || returnValue.props.children;
if(!children.props) return;
if(!children.props.children || !children.props.className) return;
if(!children.props.children.props || !children.props.children.props.children) return;
children = children.props.children.props.children[1];
if(!children) return;
if(!this.settings.dms) return;
if(!SelectedGuildStore.getGuildId()) return;
const fluxWrapper = Flux.connectStores([UserTypingStore, WindowInfo], ()=>({userIds: this.getPrivateChannels()
.filter(c => this.settings.includeMuted || !MutedStore.isChannelMuted(null, c.id))
.flatMap(c => Object.keys(UserTypingStore.getTypingUsers(c.id))
.filter(uId => (uId !== selfId) && (this.settings.includeBlocked || !RelationshipStore.isBlocked(uId)))
)
}));
const wrappedCount = fluxWrapper(({userIds}) => {
return React.createElement(renderElement, {userIds, opacity: 1, type: "dms", isFocused: WindowInfo.isFocused()});
});
children.props.children = React.Children.toArray(children.props.children);
if(children.props.children.push) children.props.children.push(React.createElement(wrappedCount));
});
Home.forceUpdateAll();
}
async patchFolders(promiseState){
const Folder = WebpackModules.find(m=>m?.type?.render && (m?.type?.render||m?.type?.__powercordOriginal_render)?.toString()?.indexOf("SERVER_FOLDER")!==-1);
if(promiseState.cancelled || !Folder) return;
const selfId = UserStore.getCurrentUser()?.id;
if(!selfId) return setTimeout(()=>this.patchFolders(promiseState), 100);
Patcher.after(Folder.type, "render", (_, [props], returnValue) => {
if(props.expanded) return;
if(!this.settings.folders) return;
const fluxWrapper = Flux.connectStores([UserTypingStore, WindowInfo], ()=>({userIds: this.getGuildChannels(...props.guildIds)
.filter(c => (this.settings.includeMuted || !MutedStore.isMuted(c.guild_id))
&& (this.settings.includeMuted || !MutedStore.isChannelMuted(c.guild_id, c.id))
&& (SelectedGuildStore.getGuildId() !== c.guild_id))
.flatMap(c => Object.keys(UserTypingStore.getTypingUsers(c.id))
.filter(uId => (uId !== selfId) && (this.settings.includeBlocked || !RelationshipStore.isBlocked(uId)))
)
}));
const wrappedCount = fluxWrapper(({userIds}) => {
return React.createElement(renderElement, {userIds, opacity: 1, type: "folder", isFocused: WindowInfo.isFocused(), id: props.folderId});
});
returnValue.props.children.push(React.createElement(wrappedCount));
});
}
getSettingsPanel(){
return this.buildSettingsPanel().getElement();
}
};
};
return plugin(Plugin, Api);
})(global.ZeresPluginLibrary.buildPlugin(config));
})();

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "2.9.0",
"hasShownChangelog": true
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
{
"currentVersionInfo": {
"version": "2.0.3",
"hasShownChangelog": true
}
}

View file

@ -0,0 +1,35 @@
/**
* @name Modern Channel Indicators
* @version 1.2.1
* @description Adds a nice touch to Discord's current channel indicators.
* @author LuckFire#4800
*
* @website https://github.com/Discord-Theme-Addons
* @source https://github.com/Discord-Theme-Addons/modern-channel-indicators/tree/main/src
**/
@import url('https://discord-theme-addons.github.io/modern-channel-indicators/src/support/compiled.css');
:root {
/* ---- base -- */
--indicator-hovered: rgba(79, 84, 92, 0.25);
--indicator-rounding: 0;
--indicator-border-info: 2px solid;
/* ---- selected -- */
--indicator-selected: 88, 101, 242;
--indicator-selected-border: rgba(var(--indicator-selected));
--indicator-selected-background: rgba(var(--indicator-selected), 0.1);
--indicator-selected-hover: rgba(var(--indicator-selected), 0.18);
/* ---- unreads -- */
--indicator-unread: 255, 255, 255;
--indicator-unread-border: rgba(var(--indicator-unread), 0.6);
--indicator-unread-background: rgba(var(--indicator-unread), 0.01);
/* ---- connected -- */
--indicator-connected: 87, 242, 135;
--indicator-connected-border: rgba(var(--indicator-connected));
--indicator-connected-background: rgba(var(--indicator-connected), 0.1);
--indicator-connected-hover: rgba(var(--indicator-connected), 0.18);
}

View file

@ -0,0 +1,21 @@
/**
* @name SettingsModal
* @description Turns Settings Windows like User-/Channel-/Serversettings and Boost Overview into Modals
* @author DevilBro
* @version 1.0.0
* @authorId 278543574059057154
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
* @website https://mwittrien.github.io/
* @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Themes/SettingsModal/
* @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Themes/SettingsModal/SettingsModal.theme.css
*/
@import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/SettingsModal/SettingsModal.css);
:root {
--settingsmodalbackground: transparent; /* default: transparent (lowest bg color of changed windows, change it in case another theme turns them transparent) */
--settingsmodalwidth: 960px; /* default: 960px (width of the settings modal, px/vw) */
--settingsmodalheight: 80vh; /* default: 80vh (height of the settings modal, px/vh) */
}

View file

@ -0,0 +1,172 @@
/**
* @name Tokyo Night
* @description Discord Port of Visual Studio Code Theme
* @author Ashtrath
* @version 2.0.0
* @authorId 2354831939099688962
*/
/* DONT TOUCH THIS!!! */
@import url("https://dyzean.github.io/Tokyo-Night/main.css");
/* Read this before editing stuff!!!
*
* > To comment or uncomment a line you need to put those "/" and "*" characters as you can see at the beginning and ending of my comments.
* (You don't need to put a * at each line like I do, it's just for readability). See more here : https://developer.mozilla.org/en-US/docs/Web/CSS/Comments
*
* > You can play with the values and see how it goes, don't delete "px" after the value if you don't have knowledges in CSS.
*
* > To change the colors, replace the HEX code with the one you picked here : https://htmlcolorcodes.com
*/
/* ====== Optional Addons ====== */
@import url("https://mr-miner1.github.io/cooler-activity-status/theme[bd].theme.css");
@import url("https://dyzean.github.io/Tokyo-Night/addons/revert-rebrand.css");
@import url("https://nyri4.github.io/Discolored/main.css");
/* VSCode User Area, get Visual Studio like user area (Enabled by default)
note: this addons doesn't works well with Compact Mode addon,
please disable this when using Compact Mode addon */
@import url("https://dyzean.github.io/Tokyo-Night/addons/vscode-user-area.css");
/* Syntax Highlight, get hljs styling with Tokyo Night scheme (Enabled by default) */
@import url("https://dyzean.github.io/Tokyo-Night/addons/syntax-highlight.css");
/* Username Background, get colorful background behind username on chat, works best with Monospace addon. (Enabled by default) */
@import url("https://dyzean.github.io/Tokyo-Night/addons/username-background.css");
/* Mac Like Titlebar (windows only), get mac style titlebar on windows client (Enabled by default) */
@import url("https://dyzean.github.io/Tokyo-Night/addons/mac-titlebar.css");
/* Compact Mode, hide some UI part on specific windows size,
<920px Channel sidebar and member list get hidden, <600px Chat window only. (Disabled by default) */
/* @import url("https://dyzean.github.io/Tokyo-Night/addons/compact-mode.css"); */
/* Monospace, use monospaced font (JetBrains Mono) instead the default one (Disabled by default) */
/* @import url("https://dyzean.github.io/Tokyo-Night/addons/monospace-fonts.css"); */
/* Square Avatar, get square avatar on chat memberlist and user area (Disabled by default) */
/* @import url("https://dyzean.github.io/Tokyo-Night/addons/square-avatar.css"); */
/* ==== Discord Variables ==== */
.theme-dark { /* Dark Mode */
/* Header Color */
--header-primary: var(--text-normal);
--header-secondary: var(--text-muted);
/* Text Color */
--text-normal: #b1bae6;
--text-muted: #565f89;
--interactive-normal: #5f647e;
--interactive-hover: #a2a6c2;
--interactive-active: #b5bad1;
--interactive-muted: #55576b;
/* Background Color */
--background-primary: #1a1b26;
--background-secondary: #171722;
--background-secondary-alt: #13131a;
--background-tertiary: #16161e;
--background-tertiary-alt: var(--background-secondary-alt);
--background-accent: #434461;
--background-floating: #161620;
--background-modifier-hover: #212331c0;
--background-modifier-active: #282a3680;
--background-modifier-selected: #24263171;
--background-modifier-accent: #1e1e29;
--background-mentioned: #252836;
--border-mentioned: #474c64;
--background-mentioned-hover: #2f3344;
--accent-color: #7aa2f7;
/* Folder Color */
--folder-color: #202332d0;
--folder-color-light: #2f3342d0;
/* Scrollbars Color */
--scrollbar-thin-thumb: transparent;
--scrollbar-thin-track: transparent;
--scrollbar-auto-thumb: #2b2b46af;
--scrollbar-auto-thumb-hover: #27273d85;
--scrollba-auto-track: transparent;
--scrollbar-auto-scrollbar-color-thumb: var(--scrollbar-auto-thumb);
--scrollbar-auto-scrollbar-color-track: var(--scrollbar-auto-track);
/* Chat Box Color */
--channeltextarea-background: var(--background-secondary);
--channeltextarea-background-hover: var(--background-tertiary);
/* Square avatar addons */
--avatar-roundess: 5px;
/* Mac Titlebar addons */
--close-button-color: #e92a2ade;
--maximize-button-color: #f7bc1bde;
--minimize-button-color: #12db33de;
}
.theme-light { /* Light Mode */
/* Header Color */
--header-primary: var(--text-normal);
--header-secondary: var(--text-muted);
/* Text Color */
--text-normal: #2e3338;
--text-muted: #747f8d;
--interactive-normal: #4c505e;
--interactive-hover: #404350;
--interactive-active: #373a44;
--interactive-muted: #77797c;
/* Background Color */
--background-primary: #d5d6db;
--background-secondary: #cecfd4;
--background-secondary-alt: #b6b7bd;
--background-tertiary: #c5c6cc;
--background-tertiary-alt: #bbbbc2;
--background-accent: #9ca3bb;
--background-floating: #c2c2c9;
--background-mentioned: #c4c7da;
--background-modifier-hover: #2c2a2a25;
--background-modifier-active: #5a525229;
--background-modifier-selected: #555e693d;
--background-modifier-accent: #06060714;
--border-mentioned: #a9afcf;
--background-mentioned-hover: #cfd2e9;
--accent-color: #365aaa;
/* Folder Color */
--folder-color: #a7a6a6d0;
--folder-color-light: #afafafd0;
/* Input Box Color */
--input-box-bg: #c2c2c7;
--input-box-border: #b3b4b8;
--input-box-border-focus: #959699;
/* Scrollbars Color */
--scrollbar-thin-thumb: transparent;
--scrollbar-thin-track: transparent;
--scrollbar-auto-thumb: #a0a0a0af;
--scrollbar-auto-thumb-hover: #77777785;
--scrollbar-auto-track: transparent;
--scrollbar-auto-scrollbar-color-thumb: var(--scrollbar-auto-thumb);
--scrollbar-auto-scrollbar-color-track: var(--scrollbar-auto-track);
/* Chat Box Color */
--channeltextarea-background: var(--background-secondary);
--channeltextarea-background-hover: var(--background-tertiary);
/* Square avatar addons */
--avatar-roundess: 5px;
/* Mac Titlebar addons */
--close-button-color: #e92a2ade;
--maximize-button-color: #f7bc1bde;
--minimize-button-color: #12db33de;
--button-position: row;
}

40
oldconfig/beets/config.yaml Executable file
View file

@ -0,0 +1,40 @@
directory: ~/Music/
library: ~/Music/library.db
threaded: yes
sort_case_insensitive: yes
ui:
color: yes
import:
write: yes
move: yes
resume: yes
from_scratch: yes
default_action: apply
language: en
group_albums: yes
autotag: yes
duplicate_action: keep
bell: no
incremental: yes
match:
strong_rec_thresh: 0.04
medium_rec_thresh: 0.10
paths:
default: $artist/$album/$disc-$track $title
plugins: chroma lyrics mbsync fetchart lastgenre deezer spotify
lyrics:
sources: genius
chroma:
auto: yes
acoustid:
apikey: 6KzkSx8Lcp

BIN
oldconfig/beets/library.db Normal file

Binary file not shown.

View file

@ -0,0 +1 @@
{"access_token": "BQAC19DYpV_T_Ml3Jrew7iaxnW54YhzbVI7VXPy0eFp3qi_nPSg8hmV-be3OV_JahQXmL-TObvVBZyq6u3E"}

Binary file not shown.

206
oldconfig/btop/btop.conf Normal file
View file

@ -0,0 +1,206 @@
#? Config file for btop v. 1.2.8
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
color_theme = "/nix/store/yg60rrdvsfd0vfxmiy5kjd91vcmzih9z-btop-1.2.8/share/btop/themes/tokyo-night.theme"
#* If the theme set background should be shown, set to False if you want terminal background transparency.
theme_background = True
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor = True
#* Set to true to force tty mode regardless if a real tty has been detected or not.
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
force_tty = False
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
#* Use withespace " " as separator between different presets.
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = False
#* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = False
#* Default symbols to use for graph creation, "braille", "block" or "tty".
#* "braille" offers the highest resolution but might not be included in all fonts.
#* "block" has half the resolution of braille but uses more common characters.
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
graph_symbol = "braille"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_cpu = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_mem = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_net = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_proc = "default"
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
shown_boxes = "proc cpu net mem"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 300
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "cpu lazy"
#* Reverse sorting order, True or False.
proc_reversed = False
#* Show processes as a tree.
proc_tree = False
#* Use the cpu graph colors in the process list.
proc_colors = True
#* Use a darkening gradient in the process list.
proc_gradient = True
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
proc_per_core = True
#* Show process memory as bytes instead of percent.
proc_mem_bytes = True
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
proc_info_smaps = False
#* Show proc box on left side of screen instead of right.
proc_left = False
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
proc_filter_kernel = False
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_upper = "total"
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_lower = "total"
#* Toggles if the lower CPU graph should be inverted.
cpu_invert_lower = True
#* Set to True to completely disable the lower CPU graph.
cpu_single_graph = False
#* Show cpu box at bottom of screen instead of top.
cpu_bottom = False
#* Shows the system uptime in the CPU box.
show_uptime = True
#* Show cpu temperature.
check_temp = True
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
cpu_sensor = "Auto"
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
show_coretemp = True
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
#* Example: "4:0 5:1 6:3"
cpu_core_map = ""
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
temp_scale = "celsius"
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
base_10_sizes = False
#* Show CPU frequency.
show_cpu_freq = True
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
clock_format = "%X"
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
background_update = True
#* Custom cpu model name, empty string to disable.
custom_cpu_name = ""
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
disks_filter = ""
#* Show graphs instead of meters for memory values.
mem_graphs = True
#* Show mem box below net box instead of above.
mem_below_net = False
#* Count ZFS ARC in cached and available memory.
zfs_arc_cached = True
#* If swap memory should be shown in memory box.
show_swap = True
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk = True
#* If mem box should be split to also show disks info.
show_disks = True
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical = True
#* Read disks list from /etc/fstab. This also disables only_physical.
use_fstab = True
#* Set to true to show available disk space for privileged users.
disk_free_priv = False
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
show_io_stat = True
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
#* Example: "/mnt/media:100 /:20 /boot:1".
io_graph_speeds = ""
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
net_download = 100
net_upload = 100
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto = False
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
net_sync = False
#* Starts with the Network Interface specified here.
net_iface = ""
#* Show battery stats in top right if battery is present.
show_battery = True
#* Which battery to use if multiple are present. "Auto" for auto detection.
selected_battery = "Auto"
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = "WARNING"