[Chrome 扩展]QR Code 二维码生成&识别

将当前页面地址、选中的文本或链接等生成二维码,也可以识别网页中的二维码图片。

虽然 Chrome 应用店里已经有很多二维码扩展了,但都不是 100% 符合我的想法。所以造了这个毫无特色的 QR Code 扩展。

扩展功能

  • 点击地址栏的图标生成页面地址的二维码。
  • 右键菜单中的生成二维码内容是根据你点击元素来的,点链接是链接地址,点文本是选中的文本,如果是其他地方就是页面地址。
  • 如果你右键的是图片,还会有识别二维码的菜单项,如果识别结果是网址,可以选择直接打开网址。
  • 双击弹出的二维码可以编辑二维码内容。
「二维码」右键菜单

更新记录

v1.3.6.5 2016-09-16

v1.3.6.4 2016-07-11

  • 修复二维码过大时的显示问题

v1.3.6.3 2016-07-09

  • 修复点击工具栏图标弹出的二维码地址可能来自其它窗口
  • 优化弹出窗口不强制隐藏滚动条
  • 修改弹出窗口最小尺寸为 300px

v1.3.6 2016-07-08

  • 优化内容过长时无法生成二维码

v1.3.5 2016-07-04

  • 更换 QR Code 生成库(QR Code Generator
  • 去掉图像尺寸,改为码元尺寸

v1.3.3 2016-04-19

  • 保存选项后自动关闭窗口
  • 优化识别失败文案

v1.3.2 2016-04-01

  • 优化扩展标题

v1.3 2016-03-31

v1.2 2016-03-18

  • 隐藏弹出窗口的滚动条
  • 添加键盘快捷键支持

v1.1.5 2015-09-29

  • 增加无法生成二维码时的错误提示
  • 修复取消编辑二维码时报错的问题

v1.1 2015-09-28

  • 点击地址栏图标调用 Chrome 自带的 Popup 功能
  • 新增[窗口失去焦点后自动关闭]选项
  • 更新扩展小图标

v1.0.3 2015-07-22

  • 浏览器全屏时,再次生成二维码时自动切换到之前的二维码标签

v1.0.2 2015-07-20

  • 二维码窗口失去焦点后,再次生成二维码时自动前置

v1.0.1 2015-07-17

  • 支持高分辨率显示

v1.0 2015-07-04

  • 第一版

扩展使用了 QRCode.jsJavascript QRCode scanner

下载地址

available in the chrome web store

37 条评论

发表评论

*

  • 对象为 canvas 元素 右键不会有识别菜单 请适配 (例子,见 58同城的租房页面,查看手机号页) 上一个评论由于加了尖括号 被过滤掉了

  • 你好 我想在别的的chrome内核浏览器上使用 请问能不能提供一下非chrome app store的下载方式?

  • 请教你一个问题,chrome扩展在popup页面做上传文件操作时,当打开选择文件窗口时,popup页面失去焦点消失,怎么解决这个问题?

  • 你好,网页版知乎的“分享”里的二维码,并不能识别呢,请问这个可以解决吗?现在知乎分享答案必须用手机扫码,简直反人类。

  • 稍微选长一点的文本内容就提示内容超长,而这个长度的内容QRCODE本身支持肯定没有问题的(别的生成软件可以生成,且不会造成识别问题),不知问题出在哪里?

  • 百度搜索页面下的“手机百度”和“百度糯米”二维码并不能识别

  • 测试了“保险公司如果是自己的资金拿200-300亿倒没什么”这句,用Anything to QRcode 扩展和你的扩展分别生成二维码,解析结果分别如下:
    Anything to QRcode 扩展:
    Raw text
    保险公司如果是自己的资金拿200-300亿倒没什么
    Raw bytes
    43 de 4b f9 de 99 9a 9e 58 5a ce 58 fb 8e 5a 68
    2e 69 e9 ce 69 8a fe 88 7a ae 5b 7b 1e 79 a8 4e
    8b 58 4e 98 79 1e 68 bb f3 23 03 02 d3 33 03 0e
    4b ab fe 58 09 2e 6b 2a 1e 4b b8 0e 4b 98 80 ec
    11 ec
    Barcode format QR_CODE
    Parsed Result Type TEXT
    Parsed Result
    保险公司如果是自己的资金拿200-300亿倒没什么

    Debug output
    left=0 right=199 top=0 bottom=199
    size=200
    matchVersion version=7 finder0=64 finder1=64 finder2=64
    matchVersion version=7 version topright = 7 0 version bottomleft = 7 0
    matchVersion version=7 timing0=1 timing1=1 alignment=1
    matchVersion version=7 format_NW =22 0 format_NESW =22 0 format = 22 ecl = 2 mask = 6
    matchVersion version=7 grades(F(V)TAF): 44444->4
    findModuleSize version=7 grade=4 error_correction_level=2 mask=6
    getCodewords mask=6 length=196
    getCodewords = 67,142,91,187,9,222,90,123,243,46,75,104,30,35,107,249,46,121,3,42,222,105,168,2,30,153,233,78,211,75,154,206,139,51,184,158,105,88,3,14,88,138,78,14,75,90,254,152,75,152,206,136,121,171,128,88,122,30,254,236,251,174,104,88,17,236,172,175,255,139,123,226,215,92,248,132,253,200,228,51,167,19,203,182,47,12,54,60,1,9,117,140,187,111,160,221,166,237,15,202,123,30,47,80,49,216,243,239,193,96,68,175,52,245,178,94,102,79,59,40,200,108,87,69,43,241,138,242,197,147,200,46,102,132,198,249,214,105,69,46,170,104,249,77,47,156,216,43,37,99,15,60,252,102,239,192,135,149,29,15,239,94,239,84,104,140,162,230,236,52,48,189,251,237,90,4,255,183,229,236,191,92,43,68,71,5,240,122,111,252,149,156,50,173,171,11
    setBlocks n_blocks_first=4 n_blocks_second=1 n_blocks=5 n_block_words_first=13 n_block_words_second=14 n_block_ec_words=26 total=196
    setBlocks block 0 (39): 0,5,10,15,20,25,30,35,40,45,50,55,60,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146,151,156,161,166,171,176,181,186,191
    setBlocks block 1 (39): 1,6,11,16,21,26,31,36,41,46,51,56,61,67,72,77,82,87,92,97,102,107,112,117,122,127,132,137,142,147,152,157,162,167,172,177,182,187,192
    setBlocks block 2 (39): 2,7,12,17,22,27,32,37,42,47,52,57,62,68,73,78,83,88,93,98,103,108,113,118,123,128,133,138,143,148,153,158,163,168,173,178,183,188,193
    setBlocks block 3 (39): 3,8,13,18,23,28,33,38,43,48,53,58,63,69,74,79,84,89,94,99,104,109,114,119,124,129,134,139,144,149,154,159,164,169,174,179,184,189,194
    setBlocks block 4 (40): 4,9,14,19,24,29,34,39,44,49,54,59,64,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195
    RS calculateSyndroms: No errors
    correctErrors in = 67,222,75,249,222,153,154,158,88,90,206,88,251,172,226,253,19,54,140,166,30,243,175,102,108,138,46,214,104,216,60,135,94,162,189,255,92,240,156
    correctErrors out = 67,222,75,249,222,153,154,158,88,90,206,88,251
    RS calculateSyndroms: No errors
    correctErrors in = 142,90,104,46,105,233,206,105,138,254,136,122,174,175,215,200,203,60,187,237,47,239,52,79,87,242,102,105,249,43,252,149,239,230,251,183,43,122,50
    correctErrors out = 142,90,104,46,105,233,206,105,138,254,136,122,174
    RS calculateSyndroms: No errors
    correctErrors in = 91,123,30,121,168,78,139,88,78,152,121,30,104,255,92,228,182,1,111,15,80,193,245,59,69,197,132,69,77,37,102,29,84,236,237,229,68,111,173
    correctErrors out = 91,123,30,121,168,78,139,88,78,152,121,30,104
    RS calculateSyndroms: No errors
    correctErrors in = 187,243,35,3,2,211,51,3,14,75,171,254,88,139,248,51,47,9,160,202,49,96,178,40,43,147,198,46,47,99,239,15,104,52,90,236,71,252,171
    correctErrors out = 187,243,35,3,2,211,51,3,14,75,171,254,88
    RS calculateSyndroms: No errors
    correctErrors in = 9,46,107,42,30,75,184,14,75,152,128,236,17,236,123,132,167,12,117,221,123,216,68,94,200,241,200,249,170,156,15,192,239,140,48,4,191,5,149,11
    correctErrors out = 9,46,107,42,30,75,184,14,75,152,128,236,17,236
    error_grade=4
    extractData bytes in (66) = 67,222,75,249,222,153,154,158,88,90,206,88,251,142,90,104,46,105,233,206,105,138,254,136,122,174,91,123,30,121,168,78,139,88,78,152,121,30,104,187,243,35,3,2,211,51,3,14,75,171,254,88,9,46,107,42,30,75,184,14,75,152,128,236,17,236
    extractData mode = 4
    extract charcount = 61
    extractData mode = 0
    extractData data(61) = 228,191,157,233,153,169,229,133,172,229,143,184,229,166,130,230,158,156,230,152,175,232,135,170,229,183,177,231,154,132,232,181,132,233,135,145,230,139,191,50,48,48,45,51,48,48,228,186,191,229,128,146,230,178,161,228,187,128,228,185,136

    =================================

    你的扩展:
    Raw text
    保险公司如果是自己的资金拿2��0��0��-��3��0��0��亿倒没什么
    Raw bytes
    44 ee fb bb fe 4b f9 de 99 9a 9e 58 5a ce 58 fb
    8e 5a 68 2e 69 e9 ce 69 8a fe 88 7a ae 5b 7b 1e
    79 a8 4e 8b 58 4e 98 79 1e 68 bb f3 28 bb f3 08
    bb f3 08 bb f2 d8 bb f3 38 bb f3 08 bb f3 08 bb
    fe 4b ab fe 58 09 2e 6b 2a 1e 4b b8 0e 4b 98 80
    ec 11 ec 11 ec 11
    Barcode format QR_CODE
    Parsed Result Type TEXT
    Parsed Result
    保险公司如果是自己的资金拿2��0��0��-��3��0��0��亿倒没什么

    Debug output
    left=6 right=205 top=6 bottom=205
    size=200
    matchVersion version=5 finder0=64 finder1=64 finder2=64
    matchVersion version=5 timing0=1 timing1=1 alignment=1
    matchVersion version=5 format_NW =4 0 format_NESW =4 1 format = 4 ecl = 0 mask = 4
    matchVersion version=5 grades(F(V)TAF): 4444->4
    findModuleSize version=5 grade=4 error_correction_level=0 mask=4
    getCodewords mask=4 length=134
    getCodewords = 68,243,238,40,251,187,187,243,254,8,75,187,249,243,222,8,153,187,154,242,158,216,88,187,90,243,206,56,88,187,251,243,142,8,90,187,104,243,46,8,105,187,233,254,206,75,105,171,138,254,254,88,136,9,122,46,174,107,91,42,123,30,30,75,121,184,168,14,78,75,139,152,88,128,78,236,152,17,121,236,30,17,104,236,187,17,80,196,86,214,170,229,31,105,85,208,106,222,158,5,9,145,36,125,54,53,226,187,215,101,44,231,144,117,151,156,157,115,219,59,121,36,138,42,4,248,75,178,76,92,148,50,50,236
    setBlocks n_blocks_first=2 n_blocks_second=0 n_blocks=2 n_block_words_first=43 n_block_words_second=0 n_block_ec_words=24 total=134
    setBlocks block 0 (67): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132
    setBlocks block 1 (67): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133
    RS calculateSyndroms: No errors
    correctErrors in = 68,238,251,187,254,75,249,222,153,154,158,88,90,206,88,251,142,90,104,46,105,233,206,105,138,254,136,122,174,91,123,30,121,168,78,139,88,78,152,121,30,104,187,80,86,170,31,85,106,158,9,36,54,226,215,44,144,151,157,219,121,138,4,75,76,148,50
    correctErrors out = 68,238,251,187,254,75,249,222,153,154,158,88,90,206,88,251,142,90,104,46,105,233,206,105,138,254,136,122,174,91,123,30,121,168,78,139,88,78,152,121,30,104,187
    RS calculateSyndroms: No errors
    correctErrors in = 243,40,187,243,8,187,243,8,187,242,216,187,243,56,187,243,8,187,243,8,187,254,75,171,254,88,9,46,107,42,30,75,184,14,75,152,128,236,17,236,17,236,17,196,214,229,105,208,222,5,145,125,53,187,101,231,117,156,115,59,36,42,248,178,92,50,236
    correctErrors out = 243,40,187,243,8,187,243,8,187,242,216,187,243,56,187,243,8,187,243,8,187,254,75,171,254,88,9,46,107,42,30,75,184,14,75,152,128,236,17,236,17,236,17
    error_grade=4
    extractData bytes in (86) = 68,238,251,187,254,75,249,222,153,154,158,88,90,206,88,251,142,90,104,46,105,233,206,105,138,254,136,122,174,91,123,30,121,168,78,139,88,78,152,121,30,104,187,243,40,187,243,8,187,243,8,187,242,216,187,243,56,187,243,8,187,243,8,187,254,75,171,254,88,9,46,107,42,30,75,184,14,75,152,128,236,17,236,17,236,17
    extractData mode = 4
    extract charcount = 78
    extractData mode = 0
    extractData data(78) = 239,187,191,228,191,157,233,153,169,229,133,172,229,143,184,229,166,130,230,158,156,230,152,175,232,135,170,229,183,177,231,154,132,232,181,132,233,135,145,230,139,191,50,139,191,48,139,191,48,139,191,45,139,191,51,139,191,48,139,191,48,139,191,228,186,191,229,128,146,230,178,161,228,187,128,228,185,136

  • 建议支持自定义缩放显示比例,文本内容过多时二维码太密,破烂手机的摄像头识别有问题,放大到满屏再识别就无压力了。

  • 非常感谢,找了很久的 QR 生成和识别的插件。博主的插件UI简单好用,关键是还在持续更新,实在感谢

  • 您好,我非常喜歡您這個 chrome 擴展(整個設計與操作概念非常棒),請問能不能夠也製作出 firefox 的附加元件? 懇請考量看看

  • 因为这个插件研究一天谷歌科*学*上*网了 还是没下载下来,给发给百度地址吧

  • 好东西啊,可是google商店要科*学*上*网啊,又没github什么的地址啊

  • 感谢,正好需要一个这样的扩展,前几天订阅看到今天需要就来翻翻,就给装上了,没有多余的功能,很实用 😉