This is a Chrome Extension I developed as my final project for Typography and Interaction. With this you can customize how you read on the web by switching fonts, changing backgrounds, and saving your favorite combos as presets, all without leaving the page. If a site doesn't offer dark mode or the typography feels off, this lets you fix it instantly.
- 3 font family options: Sans Serif, Serif, and Monospace
- 3 background options: Light, Dark, and Paper
- Descriptions on why certain fonts or colors are a nice to have
- Instant page updates, no refresh needed
- Preset saving so you can reuse your favorite combinations and label them however you wish
- Reset to restore the page to its original styles
- Start by downloading or cloning this repository
- Head over to Chrome and go to
chrome://extensions - Toggle the Developer Mode on in the top right corner
- Click Load unpacked
- Select the Recast project folder on your computer
- The extension will appear in your toolbar, make sure to pin it for easy access
- Open any webpage in Chrome
- Click the Recast icon in your Chrome toolbar
- Pick a font and a background and the page updates instantly
- Type a name in the Presets field and hit Save to keep your combo
- Click any saved preset to reapply it
- Hit Clear to restore the page back to its original styles
| Option | Description |
|---|---|
| Sans Serif | Clean, modern and good for most reading |
| Serif | Traditional and easier for long-form content |
| Monospace | Fixed-width and great for technical and heavy content |
| Option | Description |
|---|---|
| Light | #FAF9F6 Bright and good for daytime reading |
| Dark | #2C2C2C Darker and reduces eye strain |
| Paper | #F5F0E8 Warm and less harsh than pure white |
Presets let you save font + background combinations and reapply them in one click.
- Type a name in the Preset name field and click Save
- Your saved presets appear below the input
- Click any preset to instantly apply that combination to the page
- Click Remove to delete a preset from your list
- Vanilla JavaScript
- Chrome Extensions API
- CSS injection via content scripts
These are some of the functions and tools I used and want to remember:
chrome.scripting.insertCSSsends a CSS file into the webpage the user is currently onchrome.scripting.removeCSSremoves the old CSS before adding a new one so styles don't pile up on top of each otherchrome.tabs.queryfigures out which tab is open so the styles go to the right placechrome.storage.localremembers what font and background were active even after the popup closeslocalStoragesaves the user's presets so they don't disappear when the extension is closedJSON.parseandJSON.stringifyconverts saved presets into text for storage and back into usable data when neededwindow.applyFontandwindow.applyBackgroundmakes these functions available across all three script files since they're loaded separatelyquerySelectorAllplusforEachgives each font and background tile its own click listenerdocument.createElementbuilds each preset row and delete button on the fly when a preset is savedwindow.closecloses the popup when the X on the welcome banner is clickedDOMContentLoadedmakes sure the page is fully loaded before the close button starts listening for clicks
<form>and<input type="text">for the preset name field and save buttondata-fontanddata-colorattributes on each tile so JavaScript can read what was selected<ul>and<li>elements that get created dynamically each time a preset is saved- Three separate
<script>tags to loadscript.js,background.js, andpresets.js
- Flexbox to lay out the font and background tiles in a row
- CSS variables for consistent colors across the UI
- Injected stylesheets override the existing page fonts and backgrounds without touching the site's original code
color: inheriton the preset delete button so it automatically matches the text color of its parent list item, whether light or dark:emptypseudo-class on the font and background description paragraphs so they hide completely when no option is selected instead of leaving blank spacergbawith low opacity for the preset delete button background so it works on both light and dark preset rows without needing separate styles