diffenator2
diffenator2 copied to clipboard
Font toggle not working in `diffbrowsers_user_strings.html`
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:
-
Modify line 12 to use the
box-textclass as the main class with the class name formatter string being the sub-class. I.e.:<div class="box-text {{ font_class.class_name }}" ... -
Add a JS font switching function under
{% block js %}indiffbrowsers_user_strings.htmlwhich specifically targets the automatically generated class name (font_class.class_name).