sienori / simple-translate

WebExtensions for translating text on web pages
http://simple-translate.sienori.com/
Mozilla Public License 2.0
1.08k stars 118 forks source link

Rename container div to #simple-translate-container #537

Open johnmaguire opened 3 weeks ago

johnmaguire commented 3 weeks ago

Closes #521.

I have a blog created using Astro on which I posted about Simple Translate. When Astro converts the Markdown header to HTML it automatically gives the h3 an ID matching the text of the header. In this case, that's <h3 id="simple-translate">.

This happens to conflict with the container div for Simple Translate and causes rendering issues on the page.

Admittedly, an ideal PR might do something like inlining the CSS styles on the proper elements or add a build step to randomize the IDs used for Simple Translate elements. Unfortunately, I'm not that clever so this PR simple renames the container to simple-translate-container which I expect is less likely to conflict in the wild.