Fixed avatars not being animated in the popout/profile
This commit is contained in:
parent
e86e1f6062
commit
9dfe912687
|
@ -145,7 +145,7 @@ class EditUsers {
|
|||
|
||||
getDescription () {return "Allows you to change the icon, name, tag and color of users. Does not work in compact mode.";}
|
||||
|
||||
getVersion () {return "3.0.2";}
|
||||
getVersion () {return "3.0.3";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -630,7 +630,9 @@ class EditUsers {
|
|||
if (!info || !avatar) return;
|
||||
if (avatar.EditUsersChangeObserver && typeof avatar.EditUsersChangeObserver.disconnect == "function") avatar.EditUsersChangeObserver.disconnect();
|
||||
let data = BDFDB.loadData(info.id, this, "users") || {};
|
||||
avatar.style.setProperty("background", data.removeIcon ? null : ("url(" + (data.url || BDFDB.getUserAvatar(info.id)) + ") center/cover"));
|
||||
let url = data.removeIcon ? null : ("url(" + (data.url || BDFDB.getUserAvatar(info.id)) + ") center/cover");
|
||||
if (url && avatar.classList.contains(BDFDB.disCN.avatarmaskprofile) && url.search(/discordapp\.com\/avatars\/[0-9]*\/a_/) > -1) url = url.replace(".webp)", ".gif)");
|
||||
avatar.style.setProperty("background", url);
|
||||
if (!BDFDB.isObjectEmpty(data)) {
|
||||
avatar.EditUsersChangeObserver = new MutationObserver((changes, _) => {
|
||||
changes.forEach(
|
||||
|
|
Loading…
Reference in New Issue