【图】AutoReplaceHTML下载
【图】AutoReplaceHTML
【图】AutoReplaceHTML

AutoReplaceHTML

截图 详情 下载 评论

AutoReplaceHTML 详情

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.

AutoReplaceHTML 中文

这个简单的扩展可以自动修改网页的HTML源代码 (只忽略http页面、https页面)。它使用JavaScript正则表达式 (RegExp) 来识别URL并执行搜索和替换操作。重要提示: 由于Chrome只提供异步消息,网页上的脚本可能已经在执行,而这个扩展仍在运行!换句话说,使用此扩展来修改JavaScript内容可能无法按预期工作。

使用此扩展需要JavaScript正则表达式的知识!JavaScript正则表达式非常类似于Perl兼容的正则表达式 (PCRE)。

扩展的选项面板允许定义多达100个修改规则,这些修改规则在页面完全加载后应用。

“URL匹配RegExp” 包含一个正则表达式,该正则表达式定义将在哪些URL上应用规则。正则表达式在没有任何修饰符的情况下使用。

“搜索RegExp” 包含一个正则表达式,它定义了在HTML代码中搜索的内容。只有在页面的URL匹配 “URL匹配RegExp” 时才会应用。它可以包含子模式。

“修饰符” 包含 “搜索RegExp” 的修饰符。我知道三个可能的修饰符,’g’ (替换所有匹配; 你可能想要这个),’i’ (执行不区分大小写的搜索) 和 ‘m’ (多行模式,^ 和 $ 匹配开始和行结束)。

“替换” 显然包含了被替换为匹配的内容。它可能使用 $1 .. $9来引用子模式匹配。

所有Regular Expression都是在没有delimer的情况下输入的。

更改仅在单击 “保存” 按钮后才生效。但是,如果扩展检测到任何一个正则表达式中的错误,则不会保存任何内容。

如果Chome的开发人员工具窗口为选项卡打开,则控制台将显示有关匹配模式的一些信息。

所有规则都保存在本地存储中。

AutoReplaceHTML是免费软件。它没有任何保修。

这个扩展的灵感来自于FoxReplace。

如果有人愿意提供一个更好的图标,我很乐意使用它。

展开正文 ▼

应用下载

本地下载

更多类似

【图】Text Customizer
Text Customizer
5

Customize your internet with text replacement strategies. 使用文本替换策略自定义internet。

相关评论(15)

Neo Alienson

it works!

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!!

eva bloch

I want it to work with https…

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.

roberto piga

fa quello che deve fare 🙂

Ich

i tested same to but didn’t work a few examples would be nice too because on screenshot is heavy to read it

Sebastian R

doesn’t work

Champ Saravut

not work

Gage Adrian

Does not work at all.. wtf

Ivan Nikitin

dont work

Chad

Doesn’t work – Test reg expression so i know its good. Still not doing anything

Rafa Grzejszczyk

doesn’t work

Adam L

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.

UCS Coordinator

I would definitely like a tool like this for HTTPS sites.

mrreddiska

Not working

展开评论(15)▼