Skip to content

Commit

Permalink
fix a performance bug with tab throbbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
aminomancer committed Jan 24, 2022
1 parent 5229813 commit 5e2233b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion JS/animateContextMenus.uc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Animate Context Menus
// @version 1.0
// @version 1.0.1
// @author aminomancer
// @homepage https://github.com/aminomancer/uc.css.js
// @description Give all context menus the same opening animation that panel popups like the app menu have — the menu slides down 70px and fades in opacity at the same time. It's a cool effect that doesn't trigger a reflow since it uses transform, but it does repaint the menu, so I wouldn't recommend using this on weak hardware.
Expand Down Expand Up @@ -40,6 +40,7 @@ class AnimateContextMenus {
pointer-events: none;
}
`;
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
let sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(
Ci.nsIStyleSheetService
);
Expand Down
7 changes: 6 additions & 1 deletion uc-tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,11 @@ so in other words it won't show if audio is playing until you hover the general
transform: translateX(25px) scale(0.5) !important;
}

.tabbrowser-tab .tab-label:not([fadein]),
.tabbrowser-tab .tab-throbber:not([fadein]) {
display: none !important;
}

.tabbrowser-tab .tab-throbber:not([busy], [progress]) {
opacity: 0 !important;
pointer-events: none !important;
Expand Down Expand Up @@ -718,7 +723,7 @@ so in other words it won't show if audio is playing until you hover the general
}
}

.tab-throbber {
.tab-throbber[fadein] {
display: block !important;
position: relative !important;
}
Expand Down

0 comments on commit 5e2233b

Please sign in to comment.