ticket get
// ==UserScript==
// @name ticket get
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 获取 gtimg.com 验证码网站返回的 ticket
// @author nao
// @match https://*.captcha.gtimg.com/*
// @grant GM_setClipboard
// @require https://scriptcat.org/lib/637/1.3.2/ajaxHooker.js
// @run-at document-start
// ==/UserScript==
(function () {
'use strict';
console.log('ticketGet')
ajaxHooker.hook(request => {
request.response = value => {
let json = JSON.parse(value.responseText);
if (json.errorCode == "0") {
alert('已经复制到剪切版');
GM_setClipboard(json.ticket, 'text/plain');
};
};
});
})();