The changes in #5 inject a snippet of JavaScript into the body of converted html:
<script type="text/javascript"></script>
<script>document.querySelectorAll('style').forEach(style =>
style.remove());</script>
This seems to interfere with the MathJax right-click menu when conversion to MathJax is chosen in the preferences.