Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

Is there a way to make it so that when there is only one tab open that there is no x button on the tab?

  • 4 Antworten
  • 2 haben dieses Problem
  • 1 Aufruf
  • Letzte Antwort von matt7425

more options

I just updated from version 21, were when there was only one tab open there was no x on the tab to close it, but now on version 48 there is a x button. I tried searching for this but could only find about:config page: browser.tabs.closeWindowWithLastTab = false, but this only sets the x button to close the tab. I want to get rid of the x button all together when there is only one tab left.

I just updated from version 21, were when there was only one tab open there was no x on the tab to close it, but now on version 48 there is a x button. I tried searching for this but could only find about:config page: browser.tabs.closeWindowWithLastTab = false, but this only sets the x button to close the tab. I want to get rid of the x button all together when there is only one tab left.

Ausgewählte Lösung

Many aspects of Firefox's interface can be modified with custom style rules. Firefox marks the first and last tabs in the window with a special attribute (first-tab and last-tab), so you can use that to style a tab that is both the first and last tab, in other words, the only tab, and hide the button.

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
.tabbrowser-tab[first-tab="true"][last-tab="true"] .tab-close-button {
  display:none !important;
}

You can apply custom style rules to Firefox's interface using either:

I prefer Stylish because it's easy to test/preview the results and adjust the rule. However, if you do not want to add any more extensions, then userChrome.css might work better for you.

If you are using Stylish:

(1) Install Stylish and use the displayed link to restart Firefox to complete the activation

(2) Click the add-on's "S" button on the toolbar, then Write new style, then Blank style (if the S button does not appear, or you don't want another button on the toolbar, you can go to the Add-ons page, click User Styles in the left column, then use the Write New Style button on that page)

(3) In the editing window that opens, in the large box next to the 1, paste the rule

(4) Click the Preview button to apply the rule, then move the new rule to its own window so it's the only tab by right-clicking the tab and choosing Move to New Window -- the little x should disappear

(5) If it's working, enter a name in the space above the rule like Hide Close Button on Last Tab and click Save. You're done.

If it's not working, hmm, we'll have to figure out why.

Diese Antwort im Kontext lesen 👍 0

Alle Antworten (4)

more options

There is one way. Put it in full screen mode.

more options

anf25 said

There is one way. Put it in full screen mode.

I don't want to always have to be in full screen mode, also I just tried and it didn't even work.

more options

Ausgewählte Lösung

Many aspects of Firefox's interface can be modified with custom style rules. Firefox marks the first and last tabs in the window with a special attribute (first-tab and last-tab), so you can use that to style a tab that is both the first and last tab, in other words, the only tab, and hide the button.

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
.tabbrowser-tab[first-tab="true"][last-tab="true"] .tab-close-button {
  display:none !important;
}

You can apply custom style rules to Firefox's interface using either:

I prefer Stylish because it's easy to test/preview the results and adjust the rule. However, if you do not want to add any more extensions, then userChrome.css might work better for you.

If you are using Stylish:

(1) Install Stylish and use the displayed link to restart Firefox to complete the activation

(2) Click the add-on's "S" button on the toolbar, then Write new style, then Blank style (if the S button does not appear, or you don't want another button on the toolbar, you can go to the Add-ons page, click User Styles in the left column, then use the Write New Style button on that page)

(3) In the editing window that opens, in the large box next to the 1, paste the rule

(4) Click the Preview button to apply the rule, then move the new rule to its own window so it's the only tab by right-clicking the tab and choosing Move to New Window -- the little x should disappear

(5) If it's working, enter a name in the space above the rule like Hide Close Button on Last Tab and click Save. You're done.

If it's not working, hmm, we'll have to figure out why.

more options

jscher2000 said

Many aspects of Firefox's interface can be modified with custom style rules. Firefox marks the first and last tabs in the window with a special attribute (first-tab and last-tab), so you can use that to style a tab that is both the first and last tab, in other words, the only tab, and hide the button.
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
.tabbrowser-tab[first-tab="true"][last-tab="true"] .tab-close-button {
  display:none !important;
}

You can apply custom style rules to Firefox's interface using either:

I prefer Stylish because it's easy to test/preview the results and adjust the rule. However, if you do not want to add any more extensions, then userChrome.css might work better for you.

If you are using Stylish:

(1) Install Stylish and use the displayed link to restart Firefox to complete the activation

(2) Click the add-on's "S" button on the toolbar, then Write new style, then Blank style (if the S button does not appear, or you don't want another button on the toolbar, you can go to the Add-ons page, click User Styles in the left column, then use the Write New Style button on that page)

(3) In the editing window that opens, in the large box next to the 1, paste the rule

(4) Click the Preview button to apply the rule, then move the new rule to its own window so it's the only tab by right-clicking the tab and choosing Move to New Window -- the little x should disappear

(5) If it's working, enter a name in the space above the rule like Hide Close Button on Last Tab and click Save. You're done.

If it's not working, hmm, we'll have to figure out why.

This worked, thanks for the help ^^