AutoReplaceHTML

Rate / votes
More than 533 users worldwide
Current version: 0.1.5
Price: FREE
Download extension
Like this extension ? Like/Share it!
Modifies web page HTML source code via regular expressions.This simple extension can automatically modify the HTML source code of web pages (only http pages, https pages are ignored). It uses JavaScript Regular Expressions (RegExp) to identify URLs and to perform the search and replace operations. Important: as Chrome only provides asynchronous messaging, scripts on web pages might already be executing while this extension is still running! In other words, use of this extension to modify JavaScript content might not work as expected.

Knowledge of JavaScript Regular Expressions is required to use this extension! JavaScript Regular Expression are very similar to Perl Compatible Regular Expressions (PCRE).

The options panel of the extension allows to define up to 100 modification rules, which are applied after a page is completely loaded.

"URL Match RegExp" contains a Regular Expression which defines on which URLs a rule will be applied. The Regular Expression is used without any modifiers.

"Search RegExp" contains a Regular Expression which defines what is searched for in the HTML code. It will only be applied if the URL of the page matched the "URL Match RegExp". It can contain subpatterns.

"Modifiers" contains modifiers for the "Search RegExp". I am aware of three possible modifiers, 'g' (replace all matches; you probably want this), 'i' (perform a case-insensitive search) and 'm' (multi-line mode, ^ and $ match beginnung and end of lines).

"Replacement" obviously contains what is substituted for a match. It may use $1..$9 to reference subpattern matches.

All Regular Expression are entered without delimeters.

Changes only become effective after the "Save" button has been clicked. However, if the extension detects an error in any one of the Regular Expression, nothing is saved.

If Chome's Developer Tools windows is open for a tab, the console will show some information about matches patterns.

All rules are saved in the local storage.

AutoReplaceHTML is freeware. It comes without any warranty.

This extension was inspired by FoxReplace.


If anybody is willing to provide a better icon, I'd be happy to use it.

Reviews of AutoReplaceHTML extension

Similar extension