ByzantineFailure / BPM-for-Discord

BPM for Discord's Desktop App. Includes one-click installers, update notifications, and custom script support.
GNU Affero General Public License v3.0
17 stars 8 forks source link

Discord update broke one-click insertion of emotes #80

Closed Pazns closed 7 years ago

Pazns commented 7 years ago

Since a recent Discord update (2017-07-20, I think ?), the way BPM gets the input textarea is broken and doesn't work at all.

Just by looking at bpm.js release file, I see that the old way with getElementsByClassName('channel-textarea-inner'); can't work since the identifier channel-textarea-inner doesn't exist anymore.

I silly-tested things and found that searching channel-text-area-default makes it to work again. This is the first textarea–parent class identifier that isn't some generated bullshit like channelTextArea-1HTP3C.

Note that the automatic insertion is still somehow broken. User must type something in the field for it to be able to send the emote auto-inserted. There is probably an event triggering after user real input that BPM doesn't trigger by programmatically inserting text.

ByzantineFailure commented 7 years ago

Gah, okay. Looks like I need to find some time in the coming week to sit down and hammer out a few of these bugs.

On Jul 21, 2017 18:50, "Pazns" notifications@github.com wrote:

Since a recent Discord update (2017-07-20, I think ?), the way BPM gets the input textarea is broken and doesn't work at all.

Just by looking at bpm.js release file, I see that the old way with getElementsByClassName('channel-textarea-inner'); can't work since this identifier doesn't exist anymore.

I silly-tested things and found that searching "channel-text-area-default" makes it work again. This is the first class identifier that isn't some generated bullshit like "channelTextArea-1HTP3C".

Note that the automatic insertion is still somehow broken. User must type something in the field for it to be able to send the emote auto-inserted. There is probably an event triggering after user real input that BPM doesn't trigger by programmatically inserting text.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ByzantineFailure/BPM-for-Discord/issues/80, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwr6SaKzu-T_9Q8A-fDtGt7-0hRMNDyks5sQVVugaJpZM4OgCMi .

ByzantineFailure commented 7 years ago

Nevermind, you seem to have created a PR. Taking a glance over it.

ByzantineFailure commented 7 years ago

Resolved via #82