Firefox i przycisk zamknięcia tab-a po lewej stronie

| kategoria: Przeglądarki | Komentarze (0)

firefox przycisk zamykania po prawej stronie

Wstęp

Co zrobić, by przycisk zamykania tab-a był po lewej jego stronie? Można to osiągnąć wstawiając trochę kodu do Firefoks-owego arkusza stylów CSS userChrome.css, który znajduje się w folderze chrome profilu Firefoksa.

Oczywiście, folder do profilu Firefoksa w każdym systemie jest gdzie indziej. Folder profilu można znaleźć tak (dla systemów Windows poniższe dane wystarczy wkleić w linię komend Start->Uruchom):

System operacyjny Lokalizacja folderu Profile
Windows NT (NT4.x/2000/XP/Vista/7) "%APPDATA%\Mozilla\"
Unix/Linux ~/.mozilla/
Mac OS X ~/Library/Mozilla/

~/Library/Application Support/

Kod do wklejenia

/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */

/* move favicon, throbber and text to the right so that the close button appears on the left */
.tabbrowser-tab .tab-icon-image {
  -moz-box-ordinal-group: 2 !important;
}

.tabbrowser-tab .tab-throbber {
  -moz-box-ordinal-group: 2 !important;
}

.tabbrowser-tab .tab-label {
  -moz-box-ordinal-group: 3 !important;
}

/* hide close button initially */
.tabbrowser-tab .tab-close-button {
  display: none !important;
}

/* show close + hide throbber & favicon on hover */
.tabbrowser-tab:hover .tab-close-button {
  display: block !important;
}

.tabbrowser-tab:hover .tab-icon-image {
  display: none !important;
}

.tabbrowser-tab:hover .tab-throbber {
  display: none !important;
}

/* app tabs should not behave like regular tabs, so let them stay normal (viz. don't show close on hover) */
.tabbrowser-tab[pinned]:hover .tab-close-button {
  display: none !important;
}

.tabbrowser-tab[pinned]:hover .tab-icon-image {
  display: block !important;
}

Źródło kodu: GitHub

Kompatybilność

Działanie powyższego sprawdzone na Firefoksie od wersji 4 do 6.02.

Warto zajrzeć jeszcze