Greasy Fork

Greasy Fork is available in English.

安乐码

简单的利用api生产二维码,电脑端 手机端通用。非专业人士 所有数据收集于互联网 感谢原作者 如有侵权 联系删除

目前为 2021-06-26 提交的版本。查看 最新版本

// ==UserScript==
// @name         安乐码
// @author       Jones Miller
// @version      21.6.26
// @namespace    https://t.me/jsday
// @description  简单的利用api生产二维码,电脑端 手机端通用。非专业人士 所有数据收集于互联网 感谢原作者 如有侵权 联系删除
// @icon         https://s.aigei.com/src/img/png/23/23adca139a5c43c3809ab161f7f0453d.png?imageMogr2/auto-orient/thumbnail/!237x237r/gravity/Center/crop/237x237/quality/85/&e=1735488000&token=P7S2Xpzfz11vAkASLTkfHN7Fw-oOZBecqeJaxypL:z0u2BGZ4KZ3Lx5wegbSaidmXLTQ=
// @include      *
// @grant        unsafeWindow
// ==/UserScript==

(function() {
    'use strict';
  
  /* 调用外部的api,若有自己喜欢的或是api失效 可自行更换 */
  var jmQRapi='https://api.pwmqr.com/qrcode/create/?url='
  
  /**/
  function createjmwebQR() {
    var jmQRstyle='display:block;position:fixed;width:30px;height:30px;bottom:256px;right:1vmin;transition:0.5s all;background-color:#fff;background-image:url(https://s.aigei.com/src/img/png/23/23adca139a5c43c3809ab161f7f0453d.png?imageMogr2/auto-orient/thumbnail/!237x237r/gravity/Center/crop/237x237/quality/85/&e=1735488000&token=P7S2Xpzfz11vAkASLTkfHN7Fw-oOZBecqeJaxypL:z0u2BGZ4KZ3Lx5wegbSaidmXLTQ=);background-position:center;background-repeat:no-repeat;background-size:100%;box-shadow:0 0 0 2px red !important;cursor:pointer;z-index:9999999;border-radius:6px;';
    var jmQRcode='width:149px;height:149px;border-radius:10px;';
    var jmwebQR=document.createElement('div');
    jmwebQR.style=jmQRstyle; jmwebQR.onclick=function () { if (jmwebQR.style.width=='30px') { this.style=jmQRstyle+jmQRcode+'background-image:url('+jmQRapi+location.href+');' } else { this.style=jmQRstyle; } }; document.body.appendChild(jmwebQR); }; if (location.href.match('^http(s)?://')) { createjmwebQR();};
})();