修改网页字体和其他 CSS 属性值

修改网页字体,支持不同网站不同规则

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Autor
iuroc
Dnevne instalacije
0
Ukupnih instalacija
95
Ocjene
0 0 0
Verzija
1.0
Stvoreno
03.05.2023.
Ažurirano
03.05.2023.
Size
1,56 KB
Licenza
MIT
Primjenjuje se

网页字体和 CSS 属性值修改

使用方法

  1. 设置脚本对网页的匹配

    // @match        *://flowus.cn/*
    // @match        *://*.baidu.com*.cn/*
    
  2. 设置 CSS 设置规则

    数组项依次是:

    1. location 对象的属性名
    2. 匹配规则,可以是字符串或正则对象
    3. 字体名称字符串或 CSS 样式对象
    var rules = [
        ['host', 'flowus.cn', defaultFont],
        ['href', /^http.*?wolai.com/, '微软雅黑'],
        ['host', 'www.baidu.com', {
            color: 'red',
            fontSize: '20px'
        }]
    ]