зеркало из https://github.com/mozilla/gecko-dev.git
Make "go" button pref do the right thing again. Bug 129686, patch by
caillon@returnzero.com (Christopher Aillon), r=bzbarsky, sr=jag, a=asa
This commit is contained in:
Родитель
04de043081
Коммит
0309d23ed3
|
@ -78,12 +78,19 @@ const gButtonPrefListener =
|
|||
var buttonId = buttonName + "-button";
|
||||
var button = document.getElementById(buttonId);
|
||||
|
||||
// We need to explicitly set "hidden" to "false"
|
||||
// in order for persistence to work correctly
|
||||
var show = pref.getBoolPref(prefName);
|
||||
button.hidden = !show;
|
||||
if (show)
|
||||
button.setAttribute("hidden","false");
|
||||
else
|
||||
button.setAttribute("hidden", "true");
|
||||
|
||||
// If all buttons before the separator are hidden, also hide the separator
|
||||
var bookmarkSeparator = document.getElementById("home-bm-separator");
|
||||
bookmarkSeparator.hidden = allLeftButtonsAreHidden();
|
||||
if (allLeftButtonsAreHidden())
|
||||
document.getElementById("home-bm-separator").setAttribute("hidden", "true");
|
||||
else
|
||||
document.getElementById("home-bm-separator").removeAttribute("hidden");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче