Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify processing data-user-id #194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

F-park
Copy link
Contributor

@F-park F-park commented Jul 31, 2024

在 getTarget 中读取 data-user-id,不需要在 sitescript 里标注了。

@gaogaotiantian
Copy link
Owner

这里我印象中是有个毛病的。好像是data-user-id在某些其他的div上也会出现导致的弹窗太多。我印象不深了。所以选了一个相对更white list的方式。

@F-park
Copy link
Contributor Author

F-park commented Aug 1, 2024

在改过的地方都测试过了,没复现“导致的弹窗太多”问题。


反而是B站自己的用户卡片有问题,在 https://t.bilibili.com/ 下点开多个评论区,就会生成多层的用户卡片,可能指的是这个?
image

@gaogaotiantian
Copy link
Owner

B站的user-card不是singleton应该。

另外我查了一下,改用户颜色的那个功能(tagColor)是只查biliscope-userid的。我当时设计这个attribute是希望有一个完全属于biliscope的白名单制度,解耦,否则各种功能都要做这种依赖。当然后面由于shadowRoot的存在,有一些东西现在可能不太好使了。但是这个简化本身也没有到necessary的地步,B站的评论区最近也在改版,我觉得观察一下吧,不急。

理想情况下,我还是希望可以为所有biliscope感兴趣的用户id标个attribute。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants