// ==UserScript==
// @ScriptName        哔哩哔哩广告净化[墨鱼版]
// @Author            @ddgksf2013, @blackmatrix7, @app2smile, @yjqiang, @kokoryh, @Maasea, @BiliUniverse
// @ForHelp           若有屏蔽广告的需求，可公众号后台回复APP名称
// @TaiWanBilibili    https://apps.apple.com/tw/app/id1517062289
// @HKBilibili        https://apps.apple.com/hk/app/id1517062289
// @FanjuChuChai      https://space.bilibili.com/11783021/
// @WechatID          公众号墨鱼手记
// @TgChannel         https://t.me/ddgksf2021
// @Contribute        https://t.me/ddgksf2013_bot
// @Feedback          📮 ddgksf2013@163.com 📮
// @UpdateTime        2024-02-25
// @ConfigVersion     V2.0.132
// @Attention         如果广告仍然存在，请清除缓存或卸载应用重新安装
// @Attention         如需引用请注明出处，谢谢合作！
// @Function          去广告配置（自用，不定期更新）
// @Suitable          自行观看“# > ”注释内容
// @ScriptURL         https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/Bilibili.conf
// ==/UserScript==

hostname = -broadcast.chat.bilibili.com, -*cdn*.biliapi.net, -*tracker*.biliapi.net, app.bilibili.com, api.live.bilibili.com, *.bilibili.com, *.bili*.*, *.bilibili.*, grpc.biliapi.net,*biliapi.net


# ======= BiliJson 播放页处理 ======= #
# ～ BiliBili_哔哩哔哩_屏蔽广告浮窗@ddgksf2013
^https?:\/\/api\.bilibili\.com\/pgc\/activity\/deliver\/material\/receive url reject-dict
# ～ BiliBili_哔哩哔哩_Material_Ad@ddgksf2013
^https?:\/\/api\.bilibili\.com\/x\/vip\/ads\/material\/report url reject-dict
# ～ BiliBili_哔哩哔哩_小卡片广告@ddgksf2013
^https://api.bilibili.com/pgc/season/player/cards url reject-dict
# ～ BiliBili_哔哩哔哩_视频播放下方商品推广@ddgksf2013
^https?:\/\/api\.bili(api|bili)\.(net|com)\/pgc\/season\/app\/related\/recommend\? url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_点击追番Card@ddgksf2013
^https?:\/\/api\.bilibili\.com\/pgc\/season\/player\/ogv\/cards url reject-dict
# ～ BiliBili_哔哩哔哩_屏蔽4480端口[白B有问题]@kokoryh
#^http:\/\/.*:4480\/upgcxcode url reject-200


# ======= BiliJson 直播间处理 ======= #
# ～ BiliBili_哔哩哔哩_屏蔽直播间商品广告浮窗[还有一个域名]@ddgksf2013
^https?:\/\/api\.live\.bilibili\.com\/xlive\/e-commerce-interface\/v\d\/ecommerce-user\/get_shopping_info\? url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_直播去广告@bm7
^https?:\/\/api\.live\.bilibili\.com\/xlive\/app-room\/v1\/index\/getInfoByRoom url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js


# ======= BiliJson 开屏及隐私 ======= #
# ～ BiliBili_哔哩哔哩_屏蔽IP请求@ddgksf2013
^https?:\/\/app\.bilibili\.com\/x\/resource\/ip url reject
# ～ BiliBili_哔哩哔哩_应用开屏去广告@bm7
^https://app.bilibili.com/x/v2/splash/show url reject-dict
# ～ BiliBili_哔哩哔哩_应用开屏广告预加载@yjqiang
^https:\/\/app\.bilibili\.com\/x\/v2\/splash\/list url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js


# ======= BiliJson 高码率仅粉色旧版[V7.65] ======= #
# ～ BiliBili_哔哩哔哩_1080P高码率+4K画质[番剧和影视除外]@ddgksf2013
^https?:\/\/app\.bilibili\.com\/x\/v2\/account\/myinfo\? url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js


# ======= BiliJson Tab页处理 ======= #
# ～ BiliBili_哔哩哔哩_屏蔽直播页顶部轮播图@ddgksf2013
^https?:\/\/api\.live\.bilibili\.com\/xlive\/app-interface\/v2\/index\/feed url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_漫画去广告@ddgksf2013
^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.Comic\/(Flash|ListFlash|GetActivityTab) url reject-dict
# ～ BiliBili_哔哩哔哩_推荐去广告@ddgksf2013
^https?:\/\/app\.bilibili\.com\/x\/v2\/feed\/index url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_追番去广告@ddgksf2013
^https?:\/\/api\.(bilibili|biliapi)\.(com|net)\/pgc\/page\/bangumi url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_观影页面去广告@ddgksf2013
^https?:\/\/api\.(bilibili|biliapi)\.(com|net)\/pgc\/page\/cinema\/tab\? url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js


# ======= BiliJson 外观处理 ======= #
# ～ BiliBili_哔哩哔哩_标签页处理@ddgksf2013
^https?:\/\/app\.bilibili\.com\/x\/resource\/show\/tab url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_我的页面处理@ddgksf2013
^https?:\/\/app\.bilibili\.com\/x\/v2\/account\/mine url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_屏蔽首页右上活动@ddgksf2013
^https?:\/\/app\.bilibili\.com\/x\/resource\/top\/activity url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js
# ～ BiliBili_哔哩哔哩_热搜发现@ddgksf2013
^https://app.bilibili.com/x/v2/search/square url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js


# ======= BiliProto 处理 ======= #
# ～ BiliBili_哔哩哔哩_屏蔽DefaultWord@ddgksf2013
^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.app\.interface\.v1\.Search\/Default url reject
# ～ BiliBili_哔哩哔哩_搜索去广告@BiliUniverse
^https?:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.polymer\.app\.search\.v1\.Search\/SearchAll$ url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.response.min.js

# ～ BiliBili_哔哩哔哩_交互点赞投票弹幕及会员弹幕@BiliUniverse
^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.community\.service\.dm\.v1\.DM\/(DmView|DmSegMobile) url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.response.min.js

# ～ BiliBili_哔哩哔哩_青少年弹窗@BiliUniverse
^https:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.app\.interface\.v1\.Teenagers\/ModeStatus url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.response.min.js

# ～ BiliBili_哔哩哔哩_UP主推荐广告[适配ipad端]@BiliUniverse
^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.app\.(view|viewunite)\.v1\.View\/(View|TFInfo)$ url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.response.min.js

# ～ BiliBili_哔哩哔哩_动态综合页及视频页去广告@BiliUniverse
^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.app\.dynamic\.v2\.Dynamic\/Dyn(All|Video)$ url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.response.min.js



# ======= BiliNotAdded ======= #
# ～ BiliBili_哔哩哔哩_启动时开启直连模式[自行启用]@ddgksf2013
;^https?:\/\/app\.bilibili\.com\/x\/resource\/domain url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/bilibili_startup_direct.js
# ～ BiliBili_哔哩哔哩_繁体CC字幕转中文简体[自行启用hostname=aisubtitle.hdslb.com,i0.hdslb.com]@ddgksf2013
;^https?:\/\/.*\.hdslb\.com\/bfs\/subtitle\/.+\.json url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/bilibili_cc.js
# ～ BiliBili_哔哩哔哩_去除统一设置的皮肤[注释留存]@ddgksf2013
;^https?:\/\/app\.bilibili\.com\/x\/resource\/show\/skin\? url script-response-body https://rules-for-qx.sveir.xyz/Scripts/AdBlock/Bilibili/BiliBili.min.js