# chrome-ext **Repository Path**: shigebeyond/chrome-ext ## Basic Information - **Project Name**: chrome-ext - **Description**: jkcode系列之浏览器插件,用于提交网页收集效率 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-09-19 - **Last Updated**: 2022-11-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [GitHub](https://github.com/shigebeyond/chrome-ext) | [Gitee](https://gitee.com/shigebeyond/chrome-ext) chrome扩展包,包含一系列提升个人学习、工作效率的工具 # 缘由 看知乎上有些回答挺好,想复制下来,结果被限制复制(禁止转载)。 但难不住作为程序员的我,通过在devtool中写js,也能打印出回答对应的html标签的内容。 但是每次都写js很繁琐,因此想做成chrome扩展,直接双击就能将回答文本复制到内存(剪切板)。 后续逐渐扩展功能,陆续实现了翻译、远程打开、备份标签页、http请求复制与导出(curl/HttpRunner/HttpBoot/LocustBoot)等功能 用到的技术包含: es6, react18, [primereact-UI库](https://www.primefaces.org/primereact/), [webredis-消息服务器](https://gitee.com/shigebeyond/webredis), [socket.io](https://socket.io) # 安装 1. 下载源码 ``` git clone https://github.com/shigebeyond/chrome-ext.git ``` 2. 安装依赖 ``` npm i ``` 3. 编译 ``` npm run build ``` 4. 将`build/`目录拖到chrome扩展程序页面 # 功能 ## 1. 选项配置 ![](img/option.png) ## 2. 双击-复制知乎回答 ![](img/zhihu-copy.png) 在打开知乎网页时自动注入复制脚本,后续通过双击某个回答,来将回答文本复制到内存(剪切板); 仅对知乎网站有效。 ## 3. 右键菜单-网页剪报 ![](img/web-clipper.png) 收集当前网页的title+url+选中文本,并提交到配置的提交地址中(如 http://localhost/note.php),以便记录到本地文件中。 其中 note.php 的实现可参考 ```