Improved compatibality

This commit is contained in:
Mirco Wittrien 2018-10-25 13:00:58 +02:00
parent 358607341b
commit eb361a00e7
2 changed files with 10 additions and 4 deletions

View File

@ -176,7 +176,7 @@ class DisplayServersAsChannels {
getDescription () {return "Display servers in a similar way as channels.";}
getVersion () {return "1.1.1";}
getVersion () {return "1.1.2";}
getAuthor () {return "DevilBro";}
@ -213,9 +213,14 @@ class DisplayServersAsChannels {
if (addedNodes) {
addedNodes.forEach((node) => {
if (node && node.classList && node.classList.contains(BDFDB.disCN.guild) && !node.querySelector(BDFDB.dotCN.guildserror)) {
if (node.classList.contains("folder")) {
this.changeServer(this.getFolderObject(node));
}
else {
var id = BDFDB.getIdOfServer(node);
if (id) this.changeServer(BDFDB.getDivOfServer(id));
}
}
});
}
}

View File

@ -331,7 +331,7 @@ class ServerFolders {
getDescription () {return "Adds the feature to create folders to organize your servers. Right click a server > 'Serverfolders' > 'Create Server' to create a server. To add servers to a folder hold 'Ctrl' and drag the server onto the folder, this will add the server to the folderlist and hide it in the serverlist. To open a folder click the folder. A folder can only be opened when it has at least one server in it. To remove a server from a folder, open the folder and either right click the server > 'Serverfolders' > 'Remove Server from Folder' or hold 'Del' and click the server in the folderlist.";}
getVersion () {return "5.8.1";}
getVersion () {return "5.8.2";}
getAuthor () {return "DevilBro";}
@ -413,6 +413,7 @@ class ServerFolders {
observer = new MutationObserver((changes, _) => {
changes.forEach(
(change, i) => {
if (!document.querySelector(".foldercontainer.foldercontentopen")) return;
if (change.type == "attributes" && change.attributeName == "class") {
var serverObj = this.getParentObject(change.target, BDFDB.disCN.guild);
var folderDiv = this.getFolderOfServer(serverObj);