This version comes with significant changes in the inner structure of the code and how the browser API is used in the Chrome version.
On the one hand, a whole re-factorization of the content script was made using window.CopyLatex (because ESM modules are yet not fully supported in Firefox for content scripts... I just don't understand why the ESMification process of Firefox is taking so many years) either way, this is merely internal and for better code maintenance and structure (for example I had the mathjax-api injected script on one place and the script using the turndown library inside the lib folder which did not make much sense), now everything is more properly organized. If one day ESM modules are supported I'll remove the scopes and window usage for proper imports.
On the other hand as this repo is a git fork (GitHub does not allow forks of an already owned repo) of the Firefox one, maintaining the code and having to manually change all the promised-based browser API calls to chrome callbacks was becoming a mess. I then just realized I can use webextension-pollyfill without having to transform this into a monorepo and having a github action to build the proper manifest. There is no need to complicate things, at the end it was just as simply as adding the library in the chrome repo and not in the firefox one. This way the code in both extensions is extremely similar and also more robust (as it is promise-based), and not having these minor differences everywhere between 'chrome.' and 'browser.' helps a lot.
Okay so this are simply technical internal details, about actual features for users, it is mainly an improvement in UX, basically now the popup has a config button that when clicked shows some config options. I've added the following 2 basic config options
- Context menu hiding (for people that may want a less clustered context menu and never use the copy selection feature)
- Manual theme handling (for users that always want it in dark mode, or always in light mode)
Later on I plan to add custom delimiters for block equations and inline equations and also custom translations for the "Click to copy", "Copied!" and similar texts.