Closed TheChilliPL closed 2 years ago
Sorry, I tried doing this when I first made the plugin and it is not possible to do this with the current API we have.
Wouldn't it be possible manually with the DOM mutation observers? It would probably be a bit harder to do, but it would just require detecting when Discord creates this popup and adding an element there, I believe
I will look into it in the next week
I figured out a way to do it, It's in the version I just released!
Wow, that was really fast!
It seems to work well, although I can only see one tiny problem with styling:
The button, unlike any other, doesn't have the blue glow on hover. Also, if you hover at any other button after this one, it doesn't get the hover effect:
For some unknown reason, the effect isn't done with the :hover
pseudoclass, but with JS, adding the focused-3qFvc8
class to the label container element. If my research in devtools is correct, t's added by Discord in the pointerenter
event and removed in the mouseout
event handlers. The weird thing is that the pointerenter
event doesn't seem to fire on the file send button if moving the mouse from the timestamp button, not sure why that is
I already had this implemented but didn't test it without my theme lol. I fixed it and it should work properly now. Let me know if it works for you ๐
It does work unless I move my mouse back to the โsend a fileโ button ๐ค
I released a new version, should be fixed now ๐
Out of curiosity, why did it happen and how did you fix that? ๐ค Thanks for the update, works flawlessly now!
I just added another event listener to the "upload option" in the menu ๐.
It would be great if the button could be moved to the menu with the plus icon, where normally you can send files or create threads.