为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

customizing colors

  • 1 个回答
  • 1 人有此问题
  • 24 次查看
  • 最后回复者为 cor-el

more options

In Google search the default colors for links are blue for a link that I haven't looked at and a slightly different shade of blue. I have trouble seeing the difference between the 2. I have changed the link color of the link that I clicked on to orange. But when I change the "override colors specified by the page with your selections above" from "never" to "always". It changes the colors on the web page. How do I keep the orange color on visited links without effecting the colors on the web pages?

Steve

In Google search the default colors for links are blue for a link that I haven't looked at and a slightly different shade of blue. I have trouble seeing the difference between the 2. I have changed the link color of the link that I clicked on to orange. But when I change the "override colors specified by the page with your selections above" from "never" to "always". It changes the colors on the web page. How do I keep the orange color on visited links without effecting the colors on the web pages? Steve

所有回复 (1)

more options

Overriding visit colors in cases like this where the website specifies a visit color that is hard to distinguish from the link color can only be done via userContent.css. There are extensions like Stylus that can inject JavaScript, but there are restrictions and Web Extension can't work on Mozilla websites (Google shouldn't be a problem).

Add code to the userContent.css file.


@-moz-document domain(google.com) {
  a:visited { color:#rrggbb !important; } /* replace #rrggbb with your preferred text color*/
}

It is not that difficult to create userContent.css if you have never used it.

The first step is to open the "Help -> Troubleshooting Information" page and find the button to access the profile folder.

You can find this button under the "Application Basics" section as "Profile Folder -> Open Folder". If you click this button then you open the profile folder in the Windows File Explorer. You need to create a folder with the name chrome in this folder (name is all lowercase). In the chrome folder you need to create a plain text file with the name userContent.css (name is case sensitive). In this userContent.css text file you paste the text posted.

In Windows saving the file is usually the only time things get more complicated because Windows can silently add a .txt file extension and you end up with a file named userContent.css.txt. To avoid this you need to make sure to select "All files" in the dialog to save the file in the text editor using "Save File as".

You need to close (Quit/Exit) and restart Firefox when you create or modify the userContent.css file.

See also:

In Firefox 69 and later you need to set this pref to true on the about:config page to enable userChrome.css and userContent.css in the chrome folder.

  • toolkit.legacyUserProfileCustomizations.stylesheets = true

See also:

由cor-el于修改