Make Stylus styles also be applied to Shadow DOM elements.
< 脚本Stylus Shadow DOM Support的反馈
Sir, your code does not work when the ShadowDOM on the other side is created by the Chrome plugin. It may be a problem with the loading timing.
If you need to fix it, you need to add this paragraph:
function applyStylus() { const ss = document.querySelectorAll('html>style[id^="stylus-"]'); const allShadowHosts = document.querySelectorAll('*'); allShadowHosts.forEach(e => { if (!e.shadowRoot) return; Array.from(e.shadowRoot.children).forEach(el => chkNode(el) && el.remove()); ss.forEach(el => e.shadowRoot.append(el.cloneNode(true))); }); }
登录(不可用)以发表回复。
土豆服务器,请按需使用
镜像地址随时可能被墙,建议加群获取最新地址
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址
Sir, your code does not work when the ShadowDOM on the other side is created by the Chrome plugin. It may be a problem with the loading timing.
If you need to fix it, you need to add this paragraph: