rugk / unicodify

✍️ A browser add-on (Firefox, Chrome, Thunderbird) that allows you to autocorrect common text sequences and convert text characters to a look like a special font.
https://addons.mozilla.org/firefox/addon/unicodify-text-transformer/?utm_source=github.com&utm_medium=git&utm_content=repo-about-description&utm_campaign=github
Other
11 stars 2 forks source link

Support live previews in Chrome/Chromium #52

Closed tdulcet closed 3 years ago

tdulcet commented 3 years ago

Background

Live previews are not available in Chrome/Chromium because menus.onShown and menus.refresh() are not supported.

Proposed solution

Implement this workaround: https://stackoverflow.com/a/13673942 (which was originally written by a Mozilla employee).

Additional context

This would be good to fix with #44, since the context menu code will need to be refactored anyway for that.

rugk commented 3 years ago

Good idea. An implementation note: We should use this as a fallback only for Chrome/ium, all other browsers (i.e. feature-detect whether menus.onShown is implemented/there) can continue to use the IMHO cleaner current implementation.