Skip to content

Commit 3490a62

Browse files
committed
(JS) update vertical tabs pane,
all tabs menu expansion pack scripts. fix an oversight and update for a CSS change. (CSS) add a new style for container tabs in recently closed tabs menus and in all tabs menu and vertical tabs pane.
1 parent 8f3d72b commit 3490a62

File tree

3 files changed

+63
-5
lines changed

3 files changed

+63
-5
lines changed

JS/allTabsMenuExpansionPack.uc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name All Tabs Menu Expansion Pack
3-
// @version 2.0.9
3+
// @version 2.1.0
44
// @author aminomancer
55
// @homepage https://github.com/aminomancer
66
// @description Next to the "new tab" button in Firefox there's a V-shaped button that opens a
@@ -930,7 +930,7 @@
930930
box-shadow: none;
931931
-moz-box-align: center;
932932
padding-inline-end: 2px;
933-
overflow: hidden;
933+
overflow: clip;
934934
position: relative;
935935
}
936936
.panel-subview-body > .all-tabs-item .all-tabs-button:not([disabled], [open]):focus {

JS/verticalTabsPane.uc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name Vertical Tabs Pane
3-
// @version 1.6.6
3+
// @version 1.6.7
44
// @author aminomancer
55
// @homepage https://github.com/aminomancer/uc.css.js
66
// @description Create a vertical pane across from the sidebar that functions
@@ -381,7 +381,7 @@
381381
// close buttons) this way we can arrow up/down to navigate through tabs
382382
// very quickly, and arrow left/right to focus the mute and close buttons.
383383
get _verticalWalker() {
384-
if (this.__verticalWalker) {
384+
if (!this.__verticalWalker) {
385385
this.__verticalWalker = document.createTreeWalker(
386386
this.pane,
387387
NodeFilter.SHOW_ELEMENT,
@@ -1833,7 +1833,7 @@
18331833
-moz-box-align: center;
18341834
padding-inline-end: 2px;
18351835
margin: 0;
1836-
overflow: hidden;
1836+
overflow: clip;
18371837
position: relative;
18381838
}
18391839
#vertical-tabs-pane[unpinned]:not([expanded]) #vertical-tabs-list .all-tabs-item {

uc-misc.css

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,64 @@ requires recentlyClosedTabsContextMenu.uc.js */
769769
) !important;
770770
}
771771

772+
/* little dots for container tabs etc.
773+
they expand into big stripes on hover/focus.
774+
this overrides the rule above. */
775+
@media (prefers-reduced-motion: no-preference) {
776+
toolbarbutton.recently-closed-item[usercontextid],
777+
menuitem.recently-closed-item[usercontextid],
778+
.all-tabs-item:is([selected], [multiselected], [usercontextid]) .all-tabs-button {
779+
background-image: none !important;
780+
}
781+
782+
toolbarbutton.recently-closed-item[usercontextid]::before,
783+
menuitem.recently-closed-item[usercontextid]::before,
784+
.all-tabs-item .all-tabs-button::before {
785+
content: "";
786+
display: block;
787+
min-width: 4px;
788+
min-height: 4px;
789+
border-radius: 100%;
790+
margin-inline: calc(0px - var(--arrowpanel-menuitem-padding-inline)) calc(8px - var(--arrowpanel-menuitem-padding-inline));
791+
margin-block: calc(0px - var(--arrowpanel-menuitem-padding-block));
792+
background-color: var(--identity-tab-color);
793+
transition: 0.15s margin var(--uc-smooth-timing-function),
794+
0.15s min-width var(--uc-smooth-timing-function),
795+
0.15s min-height var(--uc-smooth-timing-function),
796+
0.15s border-radius var(--uc-smooth-timing-function);
797+
}
798+
799+
menuitem.recently-closed-item[usercontextid]::before {
800+
margin-inline: 0 -4px;
801+
margin-block: 0;
802+
}
803+
804+
.all-tabs-item .all-tabs-button::before {
805+
background-color: var(--main-stripe-color, transparent);
806+
transition: 0.15s margin var(--uc-smooth-timing-function),
807+
0.15s min-width var(--uc-smooth-timing-function),
808+
0.15s min-height var(--uc-smooth-timing-function),
809+
0.15s border-radius var(--uc-smooth-timing-function),
810+
0.15s background var(--uc-smooth-timing-function);
811+
}
812+
813+
toolbarbutton.recently-closed-item[usercontextid]:not([disabled]):is(:hover, :focus-visible)::before,
814+
.all-tabs-item:is([selected], [multiselected], [usercontextid]:is(:hover, :focus-within))
815+
.all-tabs-button::before {
816+
min-width: 3px;
817+
min-height: var(--subviewbutton-height);
818+
margin-inline: calc(0px - var(--arrowpanel-menuitem-padding-inline)) calc(9px - var(--arrowpanel-menuitem-padding-inline));
819+
border-radius: var(--arrowpanel-menuitem-border-radius) 0 0 var(--arrowpanel-menuitem-border-radius);
820+
}
821+
822+
menuitem.recently-closed-item[usercontextid]:not([disabled])[_moz-menuactive="true"]::before {
823+
min-width: 3px;
824+
min-height: var(--menuitem-height);
825+
margin-inline: 0 -3px;
826+
border-radius: var(--context-menuitem-border-radius) 0 0 var(--context-menuitem-border-radius);
827+
}
828+
}
829+
772830
/* this is for miscMods.uc.js' setting "Anchor permissions popup to granted permission icon" */
773831
/* adjust the popup and icon dimensions commensurately */
774832
#permission-popup[anchor-to-icon] {

0 commit comments

Comments
 (0)