Consider simplifying the codebase
μMatrix is an extension developed for both Mozilla Firefox and Google Chrome.
As such, it contains various wrappers and shims used to close the gap between the two browsers (when Firefox was still using XUL, that is.)
Also, there is a particular building system that selects different files and other similar actions, according to the target browser.
The ηMatrix codebase was obtained after using said system to generate the Firefox-specific code.
Since ηMatrix only targets XUL, many of these bridges are not needed, and only complicate the code.
Adding to that, the version used as the base for the fork, was released at a time when Pale Moon (UXP wasn't around) had a few shortcomings compared to Firefox, so the code contains ad-hoc fixes and workarounds.
Given the time that passed since then, it's likely that UXP has fixed those problem, making the workarounds useless and thus cruft that can be removed.
- General
-
Use better guards to check if we are on Pale Moon or Basilisk -
Rewrite or rework API implementations: -
assets.js -
popup.js -
tab.js -
vapi-background.js (split into multiple files) -
messaging.js
-
-
Move what can be moved into modules
-
- Pale Moon
-
Remove unnecessary polyfills -
Remove workarounds for older versions of Pale Moon (before 28.0.0)
-
- Basilisk
-
Currently it tests the platform version and handles UI differently. Pick only one branch and stick with it.
-