Update EditUsers.plugin.js

This commit is contained in:
Mirco Wittrien 2019-01-03 20:36:38 +01:00
parent 68ff8585c8
commit 09a29a010e
1 changed files with 5 additions and 1 deletions

View File

@ -525,7 +525,7 @@ class EditUsers {
processClickable (instance, wrapper) {
if (!wrapper || !instance.props || !instance.props.className) return;
if (instance.props.tag == "a" && instance.props.className.indexOf(BDFDB.disCN.anchorunderlineonhover) > -1) {
else if (instance.props.tag == "a" && instance.props.className.indexOf(BDFDB.disCN.anchorunderlineonhover) > -1) {
if (wrapper.parentElement.classList.contains(BDFDB.disCN.messagesystemcontent)) {
let message = BDFDB.getKeyInformation({node:wrapper.parentElement, key:"message", up:true});
if (message) this.changeName(message.author, wrapper);
@ -678,6 +678,10 @@ class EditUsers {
avatar.style.setProperty("background-position", "center");
avatar.style.setProperty("background-size", "cover");
}
else {
avatar.style.removeProperty("background-position");
avatar.style.removeProperty("background-size");
}
}
if (data.url || data.removeIcon) {
avatar.EditUsersChangeObserver = new MutationObserver((changes, _) => {