如何禁用 Firefox 中特定域的动态页面标题或蓝色通知点?

How do I disable dynamic page titles or the blue notification dot in Firefox for specific domains?

对于标题不断变化的页面,Firefox 会永久显示蓝点通知。这对于像 TradingView 或 GDAX 这样的页面来说尤其烦人,因为这些页面的标题会随着价格的更新而不断变化。在 other-hand 上,这对于像 Gmail 这样的页面非常有用。所以我不想全面禁用它 - 只针对特定域。

我通常会回到 Chrome,但 Firefox 57 在我的 MacBook 上要快得多。

如何在 Firefox 中禁用特定域的动态页面标题或蓝色通知点?

编写防止标题被修改的扩展名或用户脚本,例如通过用 noops 替换 title 元素及其文本内容节点上的 setter。

请注意,您必须访问不受信任的页面上下文才能执行此操作,因为扩展 运行 在单独的上下文中。

我在 Stack Overflow 的网站上是这样解决的:

  1. 在 Firefox 中打开 about:config
  2. 搜索 toolkit.legacyUserProfileCustomizations.stylesheets 并将其设置为 true
  3. 打开您的 Firefox 配置文件文件夹(在 设置帮助更多故障排除信息个人资料文件夹打开文件夹)
  4. 创建一个新文件夹 chrome 并在此文件夹中创建一个新文件 userChrome.css
  5. 打开新文件并将以下内容粘贴到其中:
@-moz-document url(chrome://browser/content/browser.xhtml) {

  .tabbrowser-tab[label*="Stack Overflow"] > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]) {
      background-image: none !important;
      }
    }
  1. 重新启动 Firefox

CSS 选择器 [label*="Stack Overflow"] 需要部分匹配浏览器选项卡的标题。如果省略它,所有选项卡的蓝点将被全局禁用。

致谢来源: https://www.userchrome.org/how-create-userchrome-css.html https://support.mozilla.org/en-US/questions/1270061 https://support.mozilla.org/en-US/questions/1181537