Update guildcount.js

This commit is contained in:
no-boot-device 2018-08-02 14:13:16 -05:00 committed by GitHub
parent d99fb2e746
commit a9fbc6276d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
function formattedGuildCount(shortened) {
const guildCount = document.querySelectorAll(".guild > div[draggable=true]").length;
const guildCount = document.querySelectorAll("[class^='guild'] > div[draggable=true]").length;
return `${guildCount} Guilds`;
}
@ -9,7 +9,7 @@ function setupServerCount() {
let gc = document.createElement("div");
gc.className = "server-count";
let glist = document.querySelector(".friends-online");
let glist = document.querySelector("[class^=friendsOnline]");
if (!glist) return;
glist.parentNode.insertBefore(gc, glist.nextSibling);
@ -55,4 +55,4 @@ exports.start = () => {
childList: true,
subtree: true
});
}
}