diffenator2 icon indicating copy to clipboard operation
diffenator2 copied to clipboard

Font toggle not working in `diffbrowsers_user_strings.html`

Open kalapi opened this issue 9 months ago • 0 comments

Issue description:

The user strings are added as 'divs' with class names created using the font_class.class_name string formatting on line 12 (for e.g. old-Bold, old-Regular, etc.).

These classnames are not targetted by the switchFonts function and as a result don't update when toggling.

Possible solutions:

  1. Modify line 12 to use the box-text class as the main class with the class name formatter string being the sub-class. I.e.: <div class="box-text {{ font_class.class_name }}" ...

  2. Add a JS font switching function under {% block js %} in diffbrowsers_user_strings.html which specifically targets the automatically generated class name (font_class.class_name).

kalapi avatar May 14 '25 17:05 kalapi