Temporarily disable public servers

This commit is contained in:
Zack 2021-02-02 09:28:13 -05:00 committed by GitHub
parent 6f7dc799df
commit 01453d8792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -52,25 +52,25 @@ export default new class V2_PublicServers {
} }
_appendButton() { _appendButton() {
if (DOM.query("#bd-pub-li")) return; /*if (DOM.query("#bd-pub-li")) return;
const wrapper = BDV2.guildClasses.wrapper.split(" ")[0]; const wrapper = BDV2.guildClasses.wrapper.split(" ")[0];
const guilds = DOM.query(`.${wrapper} .scroller-2TZvBN >:first-child`); const guilds = DOM.query(`.${wrapper} .scroller-2TZvBN >:first-child`);
if (guilds) DOM.after(guilds, this.button); if (guilds) DOM.after(guilds, this.button);*/
} }
addButton() { addButton() {
if (this.guildPatch) return; /*if (this.guildPatch) return;
const GuildList = webpackModules.find(m => m.default && m.default.displayName == "NavigableGuilds"); const GuildList = webpackModules.find(m => m.default && m.default.displayName == "NavigableGuilds");
const GuildListOld = webpackModules.findByDisplayName("Guilds"); const GuildListOld = webpackModules.findByDisplayName("Guilds");
if (!GuildList && !GuildListOld) Utils.warn("PublicServer", "Can't find GuildList component"); if (!GuildList && !GuildListOld) Utils.warn("PublicServer", "Can't find GuildList component");
this.guildPatch = Utils.monkeyPatch(GuildList ? GuildList : GuildListOld.prototype, GuildList ? "default" : "render", {after: this._appendButton}); this.guildPatch = Utils.monkeyPatch(GuildList ? GuildList : GuildListOld.prototype, GuildList ? "default" : "render", {after: this._appendButton});
this._appendButton(); this._appendButton();*/
} }
removeButton() { removeButton() {
this.guildPatch(); /*this.guildPatch();
delete this.guildPatch; delete this.guildPatch;
const button = DOM.query("#bd-pub-li"); const button = DOM.query("#bd-pub-li");
if (button) button.remove(); if (button) button.remove();*/
} }
}; };