Rothera / bpm

BetterPonymotes
GNU Affero General Public License v3.0
22 stars 23 forks source link

Add functionality for fallback emotes within Reddit #50

Open Ebreium opened 7 years ago

Ebreium commented 7 years ago

Introduces the ability to add a fallback emote on Reddit to increase compatibility for those without BPM.

This is done by entering a second emote as a modifier, which the BPM client then uses instead of the parent emote while a browser without BPM will render only the parent. So [](/twibeam-/ktwicute) will render as twibeam for those without BPM, and ktwicute for those with the extension. As the slash designates a modifier to be an emote, any other modifiers before or after the second emote are preserved, meaning [](/twibeam-i-/ktwicute-r) will appear as an inverted and reversed ktwicute for BPM users.

The click-toggle function was also changed in order to cycle through the full emote with all modifiers, the full text, and how a user without BPM would see the emote. Example: Animation of emote toggling

Uses:

This was a joint effort by Faranight, ByzantineFailure, and myself.

bb010g commented 7 years ago

Could these be squashed? Also, your editor seems to have put tabs in.

Shugabuga commented 7 years ago

Also, your editor seems to have put tabs in.

To be honest, this repo has no real code style guidelines, so I doubt it matters. Worse case, someone can add a commit converting everything into spaces.