Rules-For-Quantumult-X/Scripts/AdBlock/Bilibili/Space.js

22 lines
746 B
JavaScript
Raw Normal View History

2021-04-04 21:25:58 +08:00
//收藏排行前10长按通知进入iOS13以下通知中心不支持
let url = $request.url
let regex = /vmid=(\d*)/
let vmid = regex.exec(url)
let mid = vmid[1]
let api = `https://space.bilibili.com/ajax/member/getSubmitVideos?mid=${mid}&pagesize=10&order=stow`
$httpClient.get(api, (error, response, body) => {
if (error) {
$done({})
} else {
console.log(body)
body = JSON.parse(body)
let info = ""
body['data']['vlist'].forEach((element, index) => {
index++
let scheme = `bilibili://av/${element['aid']}`
info += index + ": " + element['title'] + "\n" + scheme + "\n"
})
$notification.post('', '', info)
$done({})
}
})