Time2Read estimator: a chrome extension

Introduction

I built a chrome extension to estimates the time to read articles on websites, named the "Time2Read Estimator". It was fun building this extension, and exciting to see myself using it on a daily basis.
The extension can be installed here
Github link: sam1037/Time2Read-Estimator (github.com)

Demo pic

Before: T2R before After: T2R after

Features

The T2R extension has 3 main features:

  1. estimate the reading time and display it
  2. support for chinese articles (other similar extension only works for English)
  3. hotkey to toggle the extension

Implementation

implementation for the estimation: T2R implementation

implementation for hotkey:
In the background script, we setup a observer listening for the command. If the command is observed, the observer will send a message to the content script of the current tab using tabs API, requesting content script to remove the estimation from the webpage.

future improvements

Things learnt and difficulties overcame

webpack
npm package
content script to manipulate elements
observer pattern: for PWA
message btw bg script and content script