覆盖Chrome扩展页面CSS [英] Override Chrome Extension Page CSS
问题描述
我试图在Chrome扩展程序页面上使用Stylish扩展程序。
I'm attempting to use the Stylish extension on the Chrome extensions page.
但由于某些原因,它无法正常工作。我试图谷歌这一点,但我只获得有关覆盖CSS扩展名不覆盖Chrome扩展页面的答案。
But for some reason it's not working. I've attempted to Google this, but I only get answers about overriding CSS with an extension not overriding the Chrome extension page.
任何想法为什么它不工作?或者我可以如何强制它?
Any ideas why it's not working? Or how I can force it?
我最初尝试这样做,以设计一个没有!重要的特定扩展。然后我尝试了!!重要的是强制它。
I initially tried this to style a specific extension without !important. Then I tried it with !important to force it.
#fjnbnpbmkenffdnngjfgmeleoegfcffe {
display: none !important;
}
然后我尝试了一个普通类,以防万一我得到扩展编号错误。但仍然无效。
And then I tried on a general class, just in case I got the extension id wrong. But still it wouldn't work.
.extension-list-item-wrapper {
display: none !important;
}
谢谢。 b $ b
Thanks.
推荐答案
所有Chrome扩展程序(包括Stylish)都无法修改 chrome://
网址上的内容。
All Chrome extensions, including Stylish, cannot modify content on chrome://
URLs.
如果您想将样式应用于 chrome:// extensions /
(实际上, chrome:// extensions-frame
),编辑位于 path / to / chrome profile dir / Default / User StyleSheets / Custom.css
的用户样式表。
If you want to apply a style to chrome://extensions/
(actually, chrome://extensions-frame
), edit the user stylesheet located at path/to/chrome profile dir/Default/User StyleSheets/Custom.css
.
此样式表应用于所有页面(包括devtools),因此请确保您选择了足够具体/唯一的CSS选择器。
This style sheet is applied to all pages (including the devtools), so make sure that you choose a sufficiently specific / unique CSS selector.
这篇关于覆盖Chrome扩展页面CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!