Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 942 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 942 Bytes

Text Rewriter

A small WebExtension to rewrite customizable patterns in a page as something else. Created mostly for personal amusement, inspired by XKCD #1288. By default this provides a "mispell" -> "misspell" replacement.

The plugin supports any Javascript regular expressions, including using backrefs and captures. We just visit the visible text nodes on the page and use nodeValue.replace for each provided pattern. This means if there is an overlapping pair of patterns A -> B and B -> C, then A - > C is shown.

Install

Firefox

Chrome

Latest changes

  • Add preference to make a list of domains exempt from text replacement (#6)
  • Add preference to skip children of <pre> and <code> tags from replacement