在 Firefox 中按域设置“允许页面选择自己的字体”

Jor*_*ril 17 firefox fonts firefox-extensions

通常,我使用 Firefox 时没有选择“允许页面选择自己的字体”选项,但时不时地有一个网站我想使用他们的字体而不是我的字体来查看......是否可以在每个页面上设置此选项-域基础?可能是插件?

har*_*ymc 1

有两个开源的 Firefox 插件可以用来以另一种方式解决问题,而不是设置“允许页面选择自己的字体”:

这两个附加组件都允许覆盖网站的 CSS 样式,并且都支持 @-moz-document 规则,该规则允许覆盖网站的正则表达式规范,包括否定前瞻。

这些示例来自文章 将样式应用于特定站点

匹配所有站点但有特定例外的示例:

@-moz-document regexp('(?!http://www\\.example\\.com).*') {
  /*
      the code in here applies to all URLs except those that start with 
      http://www.example.com
  */
}
Run Code Online (Sandbox Code Playgroud)

匹配除站点特定部分之外的所有内容的示例:

@-moz-document regexp('http://www\\.example\\.com/(?!members).*') {
  /*
      the code in here applies to all URLs on http://www.example.com, except
      those under http://www.example.com/members
  */
}
Run Code Online (Sandbox Code Playgroud)