Refactor entire extension code by timonla · Pull Request #53 · flashkillapp/flashkill
- Removed a lot of dead code
- Add typescript strict option and fix all type issues
- Improve build scripts (now
npm run watchis available to continuously build) - Refactor injection of additional content to use web components
- Use npm packages instead of
dist/third-partyfiles - Auto generate the license information from npm packages
- Compiled content script are now called index files (that they are content scripts is already indicated by them being compiled into the
dist/content/directory) content.tsfiles are the files that are called on page enter- Add extension recommendations

- Setup CI for lint, type checking and building the extension
- Format all code
Tested to write reusable html blocks using dom-chef to mimic react jxs style but webcomponents work much better and offer much more functionality if we need it in the future.
Injecting the webcomponents into the dom is not straight forward. Added a utility function (component) to aid this. It works fine as long as we don't want to pass any children (slot elements). I tried to enable easy injection with webcomponents and dom-chef but we loose typing on complex webcomponent properties (arrays and objects) and have to use full lowercase property names. Restricting ourselves to only passing primitive types to the webcomponent works fine, so we can fall back onto that. The experiment is available at https://github.com/flashkillapp/flashkill/tree/dom-chef-webcomponents-test.
There is a nice snippet included on how to create more webcomponents. More documentation to follow.