Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Commit

Permalink
Fix #36: Implement Fathom-based page extraction.
Browse files Browse the repository at this point in the history
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
biancadanforth committed Jul 31, 2018
1 parent 2473c13 commit b42f27d
Show file tree
Hide file tree
Showing 7 changed files with 3,196 additions and 2,508 deletions.
Loading

0 comments on commit b42f27d

Please sign in to comment.