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

View file

@ -1,5 +1,5 @@
function formattedGuildCount(shortened) { 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`; return `${guildCount} Guilds`;
} }
@ -9,7 +9,7 @@ function setupServerCount() {
let gc = document.createElement("div"); let gc = document.createElement("div");
gc.className = "server-count"; gc.className = "server-count";
let glist = document.querySelector(".friends-online"); let glist = document.querySelector("[class^=friendsOnline]");
if (!glist) return; if (!glist) return;
glist.parentNode.insertBefore(gc, glist.nextSibling); glist.parentNode.insertBefore(gc, glist.nextSibling);