powercord-org / powercord

A lightweight @discord client mod focused on simplicity and performance.
MIT License
1.2k stars 147 forks source link

[Feature Request] Add back data attribute to avatar parent classes. #270

Closed Tropix126 closed 4 years ago

Tropix126 commented 4 years ago

Describe the feature request Before Discord updated their avatar DOM, it used to be possible to select a users avatar by their id (due to discord using inline style background-images for setting the avatar image) and place a psuedoelement, allowing for a variety of things such as user customizable profile modals. Ever since they updated avatars, they use img tags instead of background-image making it impossible to do this. I suggest implimenting a data attribute into powercord which adds these back making it possible for all these things with pure CSS.

What Plugin would it be for? Generally all themes.

Expected behavior Append the data attribute [pc-user-id*="user_id""] to the parent classes of avatars (.wrapper-3t9DeA, .avatarWrapper-3H_478), allowing for user specific elements to be added with pure CSS and no JS injection.

cyyynthia commented 4 years ago

Duplicate of #101 Some work have been started and there are some custom data attributes around there, but not much is done yet. We still have a lot of data attrs to add (including user ids)