更新 'weixin/login.user.js'
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
				
			|||||||
// ==UserScript==
 | 
					// ==UserScript==
 | 
				
			||||||
// @name         微信登录通知
 | 
					// @name         微信登录通知
 | 
				
			||||||
// @namespace    https://miaowoo.cc/
 | 
					// @namespace    https://miaowoo.cc/
 | 
				
			||||||
// @version      0.2
 | 
					// @version      0.3
 | 
				
			||||||
// @description  自动化登录通知
 | 
					// @description  自动化登录通知
 | 
				
			||||||
// @author       MiaoWoo
 | 
					// @author       MiaoWoo
 | 
				
			||||||
// @match        https://pay.weixin.qq.com/index.php/core/home/login**
 | 
					// @match        https://pay.weixin.qq.com/index.php/core/home/login**
 | 
				
			||||||
@@ -69,18 +69,8 @@
 | 
				
			|||||||
        while (!(img.src.startsWith('https://work.weixin.qq.com/wwqrlogin'))) {
 | 
					        while (!(img.src.startsWith('https://work.weixin.qq.com/wwqrlogin'))) {
 | 
				
			||||||
            await sleep(100)
 | 
					            await sleep(100)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        await sleep(500)
 | 
					        let src = img.src
 | 
				
			||||||
        let originClass = img.className
 | 
					        await post(api, { src, title: '企业微信' })
 | 
				
			||||||
        img.className = ''
 | 
					 | 
				
			||||||
        // 创建canvas DOM元素,并设置其宽高和图片一样
 | 
					 | 
				
			||||||
        var canvas = document.createElement("canvas");
 | 
					 | 
				
			||||||
        canvas.width = img.width;
 | 
					 | 
				
			||||||
        canvas.height = img.height;
 | 
					 | 
				
			||||||
        // 坐标(0,0) 表示从此处开始绘制,相当于偏移。
 | 
					 | 
				
			||||||
        canvas.getContext("2d").drawImage(img, 0, 0);
 | 
					 | 
				
			||||||
        img.className = originClass
 | 
					 | 
				
			||||||
        let base64 = canvas.toDataURL()
 | 
					 | 
				
			||||||
        await post(api, { base64, title: '企业微信' })
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    async function main() {
 | 
					    async function main() {
 | 
				
			||||||
        if (location.origin == "https://pay.weixin.qq.com") {
 | 
					        if (location.origin == "https://pay.weixin.qq.com") {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user