საიტის გასაუმჯობესებელი სამუშაოების მიმდინარეობისას, შესაძლებლობების ნაწილი შეიზღუდება. თუ სტატიით ვერ მოახერხებ ხარვეზის გამოსწორება და შეკითხვის დასმა გსურთ, ჩვენი მხარდაჭერის გუნდი დაგეხმარებათ @FirefoxSupport გვერდის მეშვეობით Twitter-ზე და /r/firefox განყოფილებაში Reddit-ზე.

ძიება მხარდაჭერაში

ნუ გაებმებით თაღლითების მახეში მხარდაჭერის საიტზე. აქ არასდროს მოგთხოვენ სატელეფონო ნომერზე დარეკვას, შეტყობინების გამოგზავნას ან პირადი მონაცემების გაზიარებას. გთხოვთ, გვაცნობოთ რამე საეჭვოს შემჩნევისას „დარღვევაზე მოხსენების“ მეშვეობით.

ვრცლად

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 პასუხი
  • 2 მომხმარებელი წააწყდა მსგავს სიძნელეს
  • 1 ნახვა
  • ბოლოს გამოეხმაურა matt7425

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.

გადაწყვეტა შერჩეულია

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.

პასუხის ნახვა სრულად 👍 0

ყველა პასუხი (4)

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

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.

შერჩეული გადაწყვეტა

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.

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 ^^