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.
Latest reviews
- (2021-01-10) Alyx Hale: Still doesn't work. Used known good RegEx, tested on html files and confirmed function.
- (2020-04-08) mr.reddiska: Not working
- (2019-05-27) Adam Lane: This app is a great tool, but almost all sites use HTTPS these days, and as the overview explains, this tool will not work on HTTPS sites (times change, and the dev probably has something better to do now). If anyone still needs a tool like this please reply here, I should be able to make something like this work on HTTPS sites, Since I basically do this already in some of my other extensions.
- (2017-03-23) RafaĆ Grzejszczyk: doesn't work
- (2017-01-24) Chad: Doesn't work - Test reg expression so i know its good. Still not doing anything
- (2017-01-11) Ivan Nikitin: dont work
- (2016-12-22) Gage Adrian: Does not work at all.. wtf
- (2016-09-17) Champ Saravut: not work
- (2016-03-15) Sebastian R.: doesn't work
- (2015-06-20) Ich: i tested same to but didn't work a few examples would be nice too because on screenshot is heavy to read it
- (2013-11-07) roberto piga: fa quello che deve fare :)
- (2013-08-06) Ko Galniceanu: Excellent idea but it interferes with the page functionality. Even if you just search for '\<body' and replace it with '<body style="background-color: black" ', you can't submit any GET form after that from that page. Hope it will be fixed.
- (2013-06-15) eva bloch: I want it to work with https...
- (2013-05-13) JC Phlux: This was just what I needed. I needed to work on a template that used keywords to replace css, js, and image locations and this tool did the job for me. Thanks!!
- (2013-01-28) Neo Alienson: it works!
Statistics
Installs
521
history
Category
Rating
1.8 (25 votes)
Last update / version
2012-11-21 / 0.1.5
Listing languages
en