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

22 lines
746 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//收藏排行前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({})
}
})