Fix guild load check
This commit is contained in:
parent
f8894703c1
commit
58bfb6f51d
|
@ -58,14 +58,14 @@
|
|||
"name": "Rimuovi la grandezza minima",
|
||||
"note": "Rimuove la grandezza minima forzata di 940x500 di Discord"
|
||||
},
|
||||
"name": "nome",
|
||||
"name": "",
|
||||
"transparency": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"frame": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
}
|
||||
},
|
||||
"addons": {
|
||||
|
@ -116,75 +116,75 @@
|
|||
}
|
||||
},
|
||||
"developer": {
|
||||
"name": "nome",
|
||||
"name": "",
|
||||
"debuggerHotkey": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"reactDevTools": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"inspectElement": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"devToolsWarning": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"debugLogs": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"emotes": {
|
||||
"name": "nome",
|
||||
"name": "",
|
||||
"general": {
|
||||
"name": "nome",
|
||||
"name": "",
|
||||
"download": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"emoteMenu": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"hideEmojiMenu": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"autoCaps": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"modifiers": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"animateOnHover": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
}
|
||||
},
|
||||
"categories": {
|
||||
"name": "nome",
|
||||
"name": "",
|
||||
"twitchglobal": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"twitchsubscriber": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"frankerfacez": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
},
|
||||
"bttv": {
|
||||
"name": "nome",
|
||||
"note": "nota"
|
||||
"name": "",
|
||||
"note": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +200,7 @@
|
|||
"invite": "invita",
|
||||
"donate": "donare",
|
||||
"patreon": "patreon",
|
||||
"name": "nome",
|
||||
"name": "",
|
||||
"author": "autore",
|
||||
"version": "versione",
|
||||
"added": "aggiunto",
|
||||
|
@ -275,7 +275,7 @@
|
|||
"cancel": "cancellare",
|
||||
"nevermind": "non importa",
|
||||
"close": "chiudere",
|
||||
"name": "nome",
|
||||
"name": "",
|
||||
"message": "messaggio",
|
||||
"error": "errore",
|
||||
"addonErrors": "addonErrors",
|
||||
|
|
|
@ -27,7 +27,7 @@ export default new class PublicServers extends Builtin {
|
|||
const existing = DOM.query("#bd-pub-li");
|
||||
if (existing) return;
|
||||
|
||||
const guilds = DOM.query(`.${DiscordModules.GuildClasses.wrapper} .${DiscordModules.GuildClasses.listItem}`);
|
||||
const guilds = DOM.query(`.${DiscordModules.GuildClasses.guilds} .${DiscordModules.GuildClasses.listItem}`);
|
||||
if (!guilds) return;
|
||||
|
||||
DOM.after(guilds, this.button);
|
||||
|
@ -39,7 +39,7 @@ export default new class PublicServers extends Builtin {
|
|||
|
||||
get button() {
|
||||
const btn = DOM.createElement(`<div id="bd-pub-li" class="${DiscordModules.GuildClasses.listItem}">`);
|
||||
const label = DOM.createElement(`<div id="bd-pub-button" class="${"wrapper-25eVIn " + DiscordModules.GuildClasses.circleButtonMask}">${Strings.PublicServers.button}</div>`);
|
||||
const label = DOM.createElement(`<div id="bd-pub-button" class="${DiscordModules.GuildClasses.wrapper + " " + DiscordModules.GuildClasses.circleIconButton}">${Strings.PublicServers.button}</div>`);
|
||||
label.addEventListener("click", () => {this.openPublicServers();});
|
||||
btn.append(label);
|
||||
return btn;
|
||||
|
|
|
@ -97,6 +97,7 @@ export default new class Core {
|
|||
window.webpackJsonp = [];
|
||||
window.webpackJsonp.length = 10000; // In case plugins are waiting for that.
|
||||
window.webpackJsonp.flat = () => window.webpackJsonp;
|
||||
// eslint-disable-next-line no-empty-pattern
|
||||
window.webpackJsonp.push = ([[], module, [[id]]]) => {
|
||||
return module[id]({}, {}, WebpackModules.require);
|
||||
};
|
||||
|
@ -108,9 +109,9 @@ export default new class Core {
|
|||
return new Promise(resolve => {
|
||||
const checkForGuilds = function () {
|
||||
if (document.readyState != "complete") setTimeout(checkForGuilds, 100);
|
||||
const wrapper = GuildClasses.wrapper.split(" ")[0];
|
||||
const guildList = GuildClasses.guilds.split(" ")[0];
|
||||
const guild = GuildClasses.listItem.split(" ")[0];
|
||||
if (document.querySelectorAll(`.${wrapper} .${guild}`).length > 0) return resolve();
|
||||
if (document.querySelectorAll(`.${guildList} .${guild}`).length > 0) return resolve();
|
||||
setTimeout(checkForGuilds, 100);
|
||||
};
|
||||
|
||||
|
|
|
@ -146,10 +146,11 @@ export default Utilities.memoizeObject({
|
|||
|
||||
/* Commonly Used Classes */
|
||||
get GuildClasses() {
|
||||
const guildsWrapper = WebpackModules.getByProps("wrapper", "unreadMentionsBar");
|
||||
const guilds = WebpackModules.getByProps("guildsError", "selected");
|
||||
const pill = WebpackModules.getByProps("blobContainer");
|
||||
return Object.assign({}, guildsWrapper, guilds, pill);
|
||||
const guildsWrapper = WebpackModules.getByProps("base", "guilds");
|
||||
const guilds = WebpackModules.getByProps("wrapper", "acronym");
|
||||
const pill = WebpackModules.getByProps("circleIconButton");
|
||||
const listItem = WebpackModules.getByProps("listItem");
|
||||
return Object.assign({}, guildsWrapper, listItem, guilds, pill);
|
||||
},
|
||||
|
||||
get LayerStack() {return WebpackModules.getByProps("pushLayer");}
|
||||
|
|
Loading…
Reference in New Issue