[速报] B 站正在灰度测试新版评论区,大量使用 Shadow DOM 技术和自定义元素 #4804
Replies: 6 comments 3 replies
-
工具上的几个评论区功能也全失效了 |
Beta Was this translation helpful? Give feedback.
-
有一个第三方的“移除评论区蓝字搜索词”的脚本已经更新适配:https://greasyfork.org/scripts/447612/diff?v1=1406026&v2=1075765 |
Beta Was this translation helpful? Give feedback.
-
09.04 下方代码已失效目前 B 站番剧页、空间页是旧版评论区,动态页、播放页是 shadow dom 评论区 想尝鲜的用户,或想做适配的开发者,可以用下方脚本假装灰测体验 Shadow DOM 版评论区 灰测中的用户将代码中 // ==UserScript==
// @name 抢先体验 B 站 Shadow DOM 新评论区
// @namespace http://tampermonkey.net/
// @version 2024-07-07
// @description 抢先体验 B 站 Shadow DOM 新评论区
// @author You
// @match https://www.bilibili.com/video/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @grant none
// @run-at document-start
// ==/UserScript==
(function () {
"use strict";
let origValue = window.__INITIAL_STATE__;
if (origValue?.abtest) {
origValue.abtest.comment_next_version = "ELEMENTS";
}
Object.defineProperty(window, "__INITIAL_STATE__", {
get() {
return origValue;
},
set(value) {
if (value.abtest) {
value.abtest.comment_next_version = "ELEMENTS";
}
origValue = value;
}
});
})(); |
Beta Was this translation helpful? Give feedback.
-
7月13日,基本放量铺开了,未登录用户默认也给新版模式 踩坑记录
|
Beta Was this translation helpful? Give feedback.
-
目前是 就像这样: document.querySelector('bili-comments').shadowRoot.querySelector('bili-comment-thread-renderer') 或者随便找到个库好像可以穿透 shadow dom:https://github.com/webdriverio/query-selector-shadow-dom 。 但是要是哪天 Footnotes |
Beta Was this translation helpful? Give feedback.
-
我今天才发现,之前用ublock屏蔽关键词失效了,而且处于无法选中的状态。
让豆包写了一个脚本去处理,目前勉强能用 |
Beta Was this translation helpful? Give feedback.
-
目前观察到
简化评论区
又失效了自定义字体
也因为 Shadow DOM 失效了一半夜间模式
失效的地方很少,可喜可贺没找到便捷复制包括 Shadow DOM 的 HTML 的方法,于是用截长图代替了,下面截的是
bili-comment-thread-renderer
元素HTML
原图高度 19903px,点击下方可展开查看,也可点击图片链接查看 https://github.com/the1812/Bilibili-Evolved/assets/81268244/622d01c2-4543-448c-b0c5-9234dabe13e8
点击展开
渲染结果
Beta Was this translation helpful? Give feedback.
All reactions