yevolcn / code-cleaner

HTML代码清理工具

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Cleaner V0.1

Code Cleaner helps web developers get clear DOM code, when some module on page can be used again, you can use the ‘Elements Panel’,then right click mouse, choose ‘Copy as HTML’, then paste the code into Code Cleaner, custom your own option, there you go!

Code Cleaner 可以帮助Web开发人员快速获取简洁的DOM结构,当某个模块极具复用性时,可以直接在开发工具的Elements面板右键拷贝HTML,然后粘贴到Code Cleaner中进行处理,即可得到清洁可复用的代码。

  • 清除 id, class, script, idinline-style, table, Link, img, script, br, html-comment, blank
  • 清除自定义属性(自动补全)
  • 仅保留常见属性
  • 自定义正则匹配
  • 替换全部文本

另有Chrome扩展版:https://chrome.google.com/webstore/detail/ajnfhahbkopfgiheliocnmeobejfdlfe?hl=en-US

使用方法:

  1. 安装完成后该扩展会出现在“开发人员工具”中;

  2. 使用“Elements”面板,或直接在页面上点击鼠标右键“审查元素”;

  3. 在“Elements”面板中选中元素,点击右键“Copy as HTML”;

  4. 点击“Code Cleaner”选项卡,将代码粘贴到文本域中,根据自己的需要选择要清理的部分,直到满意为止。

项目主页:http://44ux.com/blog/2012/04/27/code-cleaner-chrome-extention/

在线版地址:http://44ux.com/demo/code-cleaner/index.htm

About

HTML代码清理工具