简体   繁体   English

如何在 Chrome 中更改已访问链接的颜色?

[英]How can I change the visited links color in Chrome?

I use Google Chrome Browser and I find the unvisited and visited links colors are too close each other.我使用 Google Chrome 浏览器,发现未访问和已访问的链接 colors 彼此太近。 They are very hard to distinguish, at least to me.它们很难区分,至少对我来说是这样。

I tried the old approach of modifying the Custom.css configuration file in Chrome's user data folder and no change occurred.我尝试了修改 Chrome 的用户数据文件夹中的 Custom.css 配置文件的旧方法,并且没有发生任何更改。

I'm open to solutions which include javascript code or css settings which I can run/modify in the developer's window (F12), even though they are not permanent settings.我对包含 javascript 代码或 css 设置的解决方案持开放态度,我可以在开发人员的 window (F12) 中运行/修改这些设置,即使它们不是永久设置。

Here's a solution that works for all platforms and for all versions of Chrome. 这是适用于所有平台和所有版本的Chrome的解决方案。

  1. Install the Stylist extension 安装造型器扩展
  2. Click SETTINGS in Chrome 在Chrome中点击“设置”
  3. Click EXTENSIONS 点击扩展
  4. Find the Stylist extension and click OPTIONS 找到样式扩展,然后单击“选项”。
  5. Click STYLES 单击样式
  6. Click ADD NEW STYLE 点击添加新样式
  7. Where it says "Style Name", name the style 在显示“样式名称”的地方,命名样式
  8. Click the ALL SITE check box 单击所有站点复选框
  9. Where it says "Stylesheet Text", copy and paste the following: 在显示“样式表文本”的地方,复制并粘贴以下内容:
    A:visited { color: red ! important }
  10. Click SAVE 点击保存
  11. Find a page with visited link, refresh, and you'll see the new color. 查找包含访问链接的页面,刷新后,您将看到新颜色。

You can find colors you like here , and you can also use a color code like rgb(255, 0, 0) in place of red . 您可以在此处找到喜欢的颜色,还可以使用诸如rgb(255, 0, 0)类的颜色代码代替red

Source 资源

As of version 33 of chrome browser, the stylesheets are not available anymore. 从chrome浏览器的33版开始,样式表不再可用。 So your solution on your Windows 7 pathway to custom.css is invalid. 因此,您在Windows 7上通往custom.css的路径的解决方案无效。

Meanwhile, I have not been able to find a solution for this oversight by Google for those of us with visual issues. 同时,对于我们这些视觉问题的人,我一直无法找到Google进行监督的解决方案。

Below worked for me, very good solution: 下面为我​​工作,很好的解决方案:

"If you want to DIY extension: “如果要DIY扩展名:

Create or Navigate to folder 'c:\\Users[local user]\\AppData\\Local\\Google\\Chrome\\UserData\\Default\\User StyleSheets\\' 创建或导航到文件夹“ c:\\ Users [本地用户] \\ AppData \\ Local \\ Google \\ Chrome \\ UserData \\ Default \\ User StyleSheets \\”

Create or edit 'Custom.css' within 'User StyleSheets': 在“用户样式表”中创建或编辑“ Custom.css”:

A:visited, A:visited *{color:orchid !important} A:已访问,A:已访问* {color:orchid!important}

note: this code can also be used in @Vic Jang's answer. 注意:此代码也可以在@Vic Jang的答案中使用。

Create or edit 'manifest.json': 创建或编辑“ manifest.json”:

{ "name": "my_custom_css", "version": "1", "content_scripts": [{ "matches": [" :// /*"], "css": ["Custom.css"] }], "manifest_version": 2 } {“ name”:“ my_custom_css”,“ version”:“ 1”,“ content_scripts”:[{“ matches”:[“ :// / *”],“ css”:[“ Custom.css”]}] ,“ manifest_version”:2}

goto URL with chrome: 'chrome://extensions' 带有chrome的goto URL:'chrome:// extensions'

check the 'Developer mode' box 选中“开发人员模式”框

click on 'Load unpacked extension...' 点击“加载解压的扩展程序...”

Navigate to the 'User StyleSheets' folder which contains the 'Custom.css' & 'manifest.json' 导航到“ User StyleSheets”文件夹,其中包含“ Custom.css”和“ manifest.json”

check the 'Enabled' box next to the 'my_custom_css' extension you created 选中您创建的“ my_custom_css”扩展名旁边的“已启用”框

restart chrome" 重新启动Chrome”

Try StyleBot instead.请改用StyleBot

For 2022, Stylish extension from Vic Jang's answer is becoming harder to configure, it requires you to sign up to deploy your own simple CSS style.对于 2022 年,来自 Vic Jang 答案的Stylish扩展变得越来越难以配置,它需要您注册以部署自己的简单 CSS 样式。 BAD!坏的!

  1. Install StyleBot extension安装StyleBot扩展

  2. Access extension option menu访问扩展选项菜单

在此处输入图像描述

  1. Go to style page, add new one and fill it like this: Go 到样式页面,添加新的并填写如下:

URL matching: * CSS: A:visited { color: red ! important } URL 匹配: * CSS: A:visited { color: red ! important } A:visited { color: red ! important }

在此处输入图像描述 在此处输入图像描述

  1. Done, refresh your page once and you should get nice red visited link完成,刷新你的页面一次,你应该会得到漂亮的红色访问链接

在此处输入图像描述

  1. If red is bad for readability on some site, add more override style rule for that URL/Site to another color.如果红色不利于某些站点的可读性,请将该 URL/站点的更多覆盖样式规则添加到另一种颜色。

Found solution windows 7 and 10 Tested... https://chrome.google.com/webstore/detail/stylist/pabfempgigicdjjlccdgnbmeggkbjdhd/related?hl=en 找到解决方案的Windows 7和10经过测试... https://chrome.google.com/webstore/detail/stylist/pabfempgigicdjjlccdgnbmeggkbjdhd/related?hl=zh-CN

If you dont want to click the link here's how to do it 如果您不想单击链接,请按以下步骤操作

Randolph Knackstedt said: Someone just informed me about the Chrome extension, Stylist, which I highly recommend! Randolph Knackstedt说:有人刚通知我有关Chrome扩展程序Stylist的信息,我强烈建议! https://chrome.google.com/webstore/detail/stylist/pabfempgigicdjjlccdgnbmeggkbjdhd/related?hl=en https://chrome.google.com/webstore/detail/stylist/pabfempgigicdjjlccdgnbmeggkbjdhd/related?hl=zh-CN

This extension allows the user to select a custom visited link color and acts just as the custom.css did before the most recent Chrome update. 此扩展程序允许用户选择自定义访问的链接颜色,其行为与custom.css相同,即最近的Chrome更新之前。 Yay! 好极了!

After the extension is installed, do the following: 安装扩展程序后,请执行以下操作:

--- click SETTINGS --- click EXTENSIONS --- find the stylist extension and click OPTIONS --- click STYLES --- click ADD NEW STYLE --- copy & paste the following: A:visited { color: red ! ---单击设置---单击扩展---查找样式扩展名,然后单击选项---单击样式---单击添加新样式---复制并粘贴以下内容:A:已访问{颜色:红色! important } --- name the style --- click the ALL SITE check box --- click SAVE 重要} ---命名样式---单击“所有站点”复选框---单击“保存”

Now you have red visited links. 现在您已经访问了红色的链接。 You can pick a different color if you like. 您可以根据需要选择其他颜色。

This solution has worked for me for a good while now. 此解决方案已经为我工作了很长一段时间。 It's another chrome extension, so if Stylish doesn't work for you, try Change Colors 这是另一种Chrome扩展程序,因此如果“时尚”不适用于您,请尝试更改颜色

If you want to DIY extension: 如果要DIY扩展名:

  1. Create or Navigate to folder 'c:\\Users[local user]\\AppData\\Local\\Google\\Chrome\\UserData\\Default\\User StyleSheets\\' 创建或导航到文件夹“ c:\\ Users [本地用户] \\ AppData \\ Local \\ Google \\ Chrome \\ UserData \\ Default \\ User StyleSheets \\”

  2. Create or edit 'Custom.css' within 'User StyleSheets': 在“用户样式表”中创建或编辑“ Custom.css”:

    A:visited, A:visited *{color:orchid !important}

    note: this code can also be used in @Vic Jang's answer. 注意:此代码也可以在@Vic Jang的答案中使用。

  3. Create or edit 'manifest.json': 创建或编辑“ manifest.json”:

    { "name": "my_custom_css", "version": "1", "content_scripts": [{ "matches": ["*://*/*"], "css": ["Custom.css"] }], "manifest_version": 2 }

  4. goto URL with chrome: 'chrome://extensions' 带有chrome的goto URL:'chrome:// extensions'

  5. check the 'Developer mode' box 选中“开发人员模式”框

  6. click on 'Load unpacked extension...' 点击“加载解压的扩展程序...”

  7. Navigate to the 'User StyleSheets' folder which contains the 'Custom.css' & 'manifest.json' 导航到“ User StyleSheets”文件夹,其中包含“ Custom.css”和“ manifest.json”

  8. check the 'Enabled' box next to the 'my_custom_css' extension you created 选中您创建的“ my_custom_css”扩展名旁边的“已启用”框

  9. restart chrome 重新启动Chrome

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM