V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
cr4fun

写了个 chrome 扩展,方便生成二维码

  •  
  •   cr4fun · Mar 31, 2020 · 2911 views
    This topic created in 2219 days ago, the information mentioned may be changed or developed.

    https://github.com/cr4fun/ChromeExtensionQRcode

    其实,核心代码就一句话,而且是调用的 qrserver 的 api:

    chrome.tabs.getSelected(null, function (tab) {
        console.log(tab.url);
        $('#qrcode').attr('src','https://api.qrserver.com/v1/create-qr-code/?size=150x150&data='+tab.url);
    });
    
    
    4 replies    2020-04-02 14:54:16 +08:00
    54xavier
        1
    54xavier  
       Mar 31, 2020
    其实 jq 有个生成二维码的插件还不错,推荐一下 jquery.qrcode.js ,项目里一开始用外部 api 做,结果有天 api 崩了,导致损失惨重,然后就找到了这个 jq 插件,直接前端生成。
    unicloud
        4
    unicloud  
       Apr 2, 2020
    https://www.dute.org/qrcode 支持自定义 Logo 的二维码生成工具
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5757 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 01:41 · PVG 09:41 · LAX 18:41 · JFK 21:41
    ♥ Do have faith in what you're doing.