Skip to content

v1.11.0

Choose a tag to compare

@jamestomasino jamestomasino released this 12 Jun 10:46
· 68 commits to master since this release
v1.11.0

This update focused on two major changes to the Stutter codebase: Webpack updates and Text Fragments

Webpack updates

I've been using the triple-webpack structure to build the extension parts (backrgound, content, and options) through node ever since the earliest releases. That relies on a number of different loaders and plugins and babel. Over the last few years webpack has changed significantly and many of those tools are no longer the maintained ways of doing things. This update pulls in the latest webpack and strips out all those old dependencies. This also cleared up a number of vulnerabilites in the repo. These vulnerabilities were mostly in dev-tooling, not the resulting code, but it's a nice feeling anyway.

Impact

The biggest factor that's impacting things now is Babel is affecting the outputted code more than it was before, and including a new Function constructor that gets flagged in Firefox's automated scanning. I don't know if that's necessary anymore since this extension is for evergreen browsers anyway. I may see if it still affects things if I move it to a dev dependency and not a build one, stripping out polyfills completely.

As I mentioned above, this also clears up almost all the vulnerabilities in the project. I have one remaining that's a result of the web-ext module (not present in the build output). That's been addressed in the master branch of web-ext, so it should be cleared up when the next release drops.

Text Fragments

A long-awaited feature for Stutter was the ability to update the background page to indicate where you are in the reading. This was marked as help-wanted for a while because I didn't see a good path forward. The data Stutter displays may have been pulled from your webpage, but it's no longer connected back to the DOM by the time it's displaying, especially if you use the full-page Stutter which uses Mozilla's Readability library in between. Thanks to some great suggestions I found a way.

We're now abusing the polyfill for text fragments to add <mark> tags around the phrase you're currently reading. It's not 100% perfect since the text we're processing may not be a 1:1 to what's in the DOM, but it's pretty close. As you read through a page that serves its purpose nicely and gives you a visual progress indicator in the background.