gaogaotiantian / biliscope

Bilibili chrome extension to show uploader's stats
MIT License
575 stars 45 forks source link

`ui.js`中插入的css导致B站部分图标样式异常 #72

Closed Redlnn closed 1 year ago

Redlnn commented 1 year ago

ui.js 中的 getUserProfileCardHTML() 插入了 <style>svg{fill:#adadad}</style>,会导致B站其他 svg 图标异常。

版本:0.4.2

受影响的有(不完全): 位置 图片
导航栏中的动态和收藏图标 image
导航栏投稿按钮 image
播放器的弹幕图标 image
播放器右下角的投诉和笔记图标 image
播放页面的广告图标 image
Redlnn commented 1 year ago

可以使用

<svg xmlns="http://www.w3.org/2000/svg" height="12px" viewBox="0 0 512 512" fill="#adadad">
  <!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc.-->
  <path ...  />
</svg>

来代替

<svg xmlns="http://www.w3.org/2000/svg" height="12px" viewBox="0 0 512 512">
  <!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
  <style>
    svg {
        fill: #adadad
    }
  </style>
  <path ...  />
</svg>

以解决这个问题

gaogaotiantian commented 1 year ago

啊,是这样的~你是想来完成这个PR还是我直接改掉呢?

Redlnn commented 1 year ago

啊,是这样的~你是想来完成这个PR还是我直接改掉呢?

啊,你直接改掉就好,可以来个co author~

gaogaotiantian commented 1 year ago

co author的话,需要提供一下你的email。如果你希望keep your email private,可以提供github的no-reply email https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address

Redlnn commented 1 year ago

啊,我还是直接pr好惹(笑)

gaogaotiantian commented 1 year ago

Fixed by #74