firefox火狐浏览器隐藏顶部标签

在使用树状标签后,屏幕顶部横向的标签就无用了,可以考虑隐藏掉。

我使用了 tree-style-tab/:https://addons.mozilla.org/zh-CN/firefox/addon/tree-style-tab/

但是和edge不一样的是,这个扩展并不能自动隐藏横向的标签。这就需要我们自己处理。

火狐支持用css的方式来定义外观,所以我们这里先打开这个功能。

# 启用 userChrome.css

在火狐地址栏输入about:config回车,跳过警告信息后,输入 toolkit.legacyUserProfileCustomizations.stylesheets 设置为 true

# 创建userChrome.css

点击 火狐浏览器 右侧的 点帮助,排除更多故障信息 ,找到 配置文件夹 打开目录。

比如 ,我的目录是 ~/.mozilla/firefox/aiqooixw.default-esr 再这个目录下 新建一个文件夹 名字叫做 chrome ,然后再 chrome目录里面 新建一个css文件名称为userChrome.css

# userChrome.css 文件内容

注意,这部分内容要根据你的情况做适当的调整,主要是 /* leftTop drag area */ 这行 以及 #titlebar 的 margin-bottom 才可以
经过测试,96-115版本均可以实现,我主力用的firefox-esr 115 ,桌面环境是 i3w 下面css内容是我测试正常的。 另外附上 火狐默认快捷键,和树形标签配合使用效率提升:https://support.mozilla.org/zh-CN/kb/%E9%94%AE%E7%9B%98%E5%BF%AB%E6%8D%B7%E9%94%AE

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#main-window:not([drawtitle="true"]):not([inFullscreen="true"])

#nav-bar {
    margin-left : 30px;  /* leftTop drag area */
    border-right: 140px solid var(--toolbar-bgcolor);
}
:root[sizemode="maximized"] #nav-bar {
    margin-top: 20px !important;   /* Top drag area */
    margin-left : 0px !important;  /* hidden leftTop drag area in Fullscreen mode*/
    border-right: 140px solid var(--toolbar-bgcolor);
}
:root[privatebrowsingmode="temporary"] #nav-bar {
    border-right: 180px solid var(--toolbar-bgcolor) !important;
}

/* 主要是修改这里的 margin-bottom 支持复数 */
#titlebar {
    margin-bottom: -0px !important;
}

/* move down 3 button on rightTop */
.titlebar-buttonbox-container {
  margin-bottom: -5px !important;
}
:root[sizemode="maximized"] .titlebar-buttonbox-container {
  margin-bottom: -15px !important;
}

/* move down private icon */
.private-browsing-indicator {
  margin-bottom: -8px !important;
}
:root[sizemode="maximized"] .private-browsing-indicator {
  margin-bottom: -18px !important;
}

/* hidden horizontal tabbar on top */
#tabbrowser-tabs[orient="horizontal"] {
    visibility: collapse !important;
}

#sidebar-box[sidebarcommand="_0ad88674-2b41-4cfb-99e3-e206c74a0076_-sidebar-action"]
sidebarheader {
    visibility: collapse !important;
}
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计