Skip to content

Releases: jamestomasino/stutter

v1.12.1

20 Jun 18:12
v1.12.1
Compare
Choose a tag to compare

Wake-Lock Support

Some browsers are now supporting a new API to control screen timeout called Wake Lock. Unfortunately support for the feature isn't universal just yet. If you're a Firefox user this will have to wait a bit longer, which is a real shame. Since Firefox Android Nightly has a way to enable Stutter (It's a pain in the butt) I would have loved to have had wake-lock working on my phone where my timeout is the shortest. Even so, this was a requested feature from one of the add-on stores, so I hope it makes at least one user happy.

How it works

While Stutter is running/stuttering, wake-lock will attempt to disable the screen timeout of your device. If the API exists and permission is allowed you won't need to worry about your screen going dim or turning off while you're reading. Once Stutter or the tab is closed wake-lock releases and your timeout is back to normal. It works on Chrome and Edge, but not Firefox as of this release.

Locale Enhancements

I realized during another recent update that my "Other Punctuation Delay" was being applied to a specific set of characters and not a big-long configurable pattern set by locale. That was embarrasing! So I set off to move those patterns into the locales.json file where contributors could tweak them for their specific language. It is, hopefully, another big step toward true localization support.

Now the punctuation characters are much more varied, which is great, but there was also a big improvement in how I am handling localized strings across the application. A singleton "Locales" class is available to provide access to these strings where they're needed. It automatically refreshes its values when the locale is set or changes. As usual, the fallback is English if a locale doesn't exist in the JSON file.

v1.12.0

13 Jun 20:57
v1.12.0
Compare
Choose a tag to compare

Improved Text Parsing

I've had a long struggle in Stutter with the results returned from Mozilla's Readability API. The API returns two important objects, a "content" node with the HTML of the processed page, and the "textContent" node with just the text content of the page. We've been using the textContent to display text in Stutter. Unfortunately textContent as a DOM method is quite poor at providing human-quality results. It simply grabs the text nodes from everything in the DOM tree and concatonates them together. This means that sometimes the end of one paragraph would be butting up against the words at the start of the next one.

I've implemented a lot of crazy regular expression matching patterns attempting to identify the false collapses and fix them, but it's not perfect. I know some people have noted this, and you can even see an example of it in the demo video.

Today I bit the bullet and decided to try and use the "content" object with its full DOM and construct a better text output. Initially I was going to try and leverage innerText to do this, but the browser implementations on that feature have diverged and I can't trust it. Thankfully this is an open-source world and someone else has authored and maintaned the html-to-text package which does exactly what I want, and it even works in node.

This release implements that new parsing algorithm which should result in much better output, better background page highlighting, and overall just a better experience.

v1.11.1

12 Jun 12:09
v1.11.1
Compare
Choose a tag to compare

Bugfix: Text fragments with special characters

When our lovely new text-fragment highlighting feature ran into a block of text with special characters (especially %) it would hang on processing. I wasn't sure why until I remembered that this code is expecting the text-fragment strings to be coming from the URL bar, so those entities should be encoded. I've wrapped the processing in a urlencode() function and the problem is fixed.

v1.11.0

12 Jun 10:46
v1.11.0
Compare
Choose a tag to compare

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.

v1.10.4

28 Apr 16:09
v1.10.4
Compare
Choose a tag to compare

Background dimming

This version adds a dimming of the background to Stutter that gives the eye less extreme color difference between the area of focus and the background. This screen is customizable by theme (see wiki) and non-interactive, so you can still click through it or scroll the page as Stutter continues.

We also fixed a small rendering issue with the drag handle character. It was previously an image that didn't change color with theme changes. This made it hard to see on the Light theme in particular. It is now a unicode character and follows the button color CSS in the themes.

Global Hotkey

09 Jan 15:02
v1.8.2
Compare
Choose a tag to compare

The global hotkey Alt-Shift-R will start Stutter

Hyphen Breaking

09 Jan 13:57
v1.8.1
Compare
Choose a tag to compare

Version 1.8.1 will split hyphenated words only if the word exceeds the Maximum Word Length setting. When a long word is found it first splits on any hyphens found. If any of the remaining parts, or the word itself, is still too long it will use the word parts to break up the word by common prefixes and suffixes. Finally, if all else fails, we use common vowel/consonant patterns to try and break it somewhere that's not too bad.

Maximum Word Length

09 Jan 12:23
v1.8.0
Compare
Choose a tag to compare

The settings panel now allows you to manually set the maximum word length. Words longer than this length will be broken into parts and served hyphenated.

Keyboard Shortcuts

23 Oct 15:22
v1.7.0
Compare
Choose a tag to compare

This release adds basic keyboard shortcuts to Stutter.

  • Enter - Pause/Play
  • Esc - Exit Stutter
  • Alt+Up / Alt+Down - Increase or decrease speed
  • Alt+Left / Alt+Right - Skip backward or forward