Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeStyleTab hide-when-single-window hack doesn't work anymore #4

Closed
ELLIOTTCABLE opened this issue Feb 22, 2019 · 2 comments
Closed

Comments

@ELLIOTTCABLE
Copy link

Using this extension, and your CSS hack from piroor/treestyletab#1768 doesn't seem to be working anymore, as of FireFox 65, possibly?

  1. I have this extension installed (the latest version, v4.7), though I don't think I see any counts in the titles …
  2. With TST 2.7.22,
  3. And FireFox 65.0.1,
  4. Using the following userChrome.css:
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar {
  opacity: 0;
  pointer-events: none;
}

#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
    visibility: collapse !important;
}


/* For only Tree Style Tab sidebar #1397 */

#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
  display: none;
}

/* Auto-hide sidebar in windows with only one tab (requires another extension) #1768 */

#main-window[titlepreface="[1] "] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  visibility: collapse !important;
}

Am I doing something wrong? I'm not sure what changed. )=

@Figure7591
Copy link

I am having this problem as well across multiple machines.

@Lej77
Copy link
Owner

Lej77 commented Feb 26, 2019

The last version of this extension (v4.7) changed the title prefix for default settings to allow for using window names. This accidentally caused an extra space to be added to the default prefix so that the prefix ended with two spaces. This made no visibly change but did affect this CSS code since the titlepreface attribute value needed to be exactly equal to [1] (with only one space). I have updated the extension (v4.8) to remove the extra space in the default settings to fix the problem. So updating the extension should fix the issue.

On a related note I also changed the code snippet in the Tree Style Tab wiki to:

#main-window[titlepreface^="[1] "] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  visibility: collapse !important;
}

note the extra ^ before the = sign. CSS attribute selectors are not limited to checking that an attributes value is exactly equal to something. This change makes it so that it only check that the prefix starts with [1] which would work even in version 4.7 of the addon. It also makes it possible to have window names in the prefix and still use this CSS code.

@Lej77 Lej77 closed this as completed Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants