This repository has been archived by the owner on Dec 3, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #36: Implement Fathom-based page extraction.
Got Fathom working in the WebExtension based on [Swathi Iyer](https://github.com/swathiiyer2/fathom-products) and [Victor Ng’s](https://github.com/mozilla/fathom-webextension) prior work. Right now it just logs the highest scoring nodes’ values for product title, image and price in the console from background.js. While [`jsdom`](https://www.npmjs.com/package/jsdom) is a `fathom-web` dependency, it is used only for running `fathom-web` in the Node context for testing. To avoid build errors associated with `jsdom` and its dependencies, I added a `’null-loader’` for that `require` call, which mocks the module as an empty object. This loader is also used in webpack.config.test.js, from PR#32. Issues: * I get a notification from Firefox at times saying the extension is slowing down the browser. * Background.js is not always logging the results to the console with `npm run watch` enabled. I’m not yet sure why.
- Loading branch information