зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1198688 - Disable option to show search suggestions in location bar in permanent private browsing mode. r=Mossop
This commit is contained in:
Родитель
62bdce4c80
Коммит
996aa36201
|
@ -61,15 +61,35 @@ var gSearchPane = {
|
|||
|
||||
this._initAutocomplete();
|
||||
|
||||
let urlbarSuggests = document.getElementById("urlBarSuggestion");
|
||||
urlbarSuggests.hidden = !Services.prefs.getBoolPref("browser.urlbar.unifiedcomplete");
|
||||
let suggestsPref =
|
||||
document.getElementById("browser.search.suggest.enabled");
|
||||
suggestsPref.addEventListener("change", () => {
|
||||
this.updateSuggestsCheckbox();
|
||||
});
|
||||
this.updateSuggestsCheckbox();
|
||||
},
|
||||
|
||||
let suggestsPref = document.getElementById("browser.search.suggest.enabled")
|
||||
let updateSuggestsCheckbox = () => {
|
||||
urlbarSuggests.disabled = !suggestsPref.value;
|
||||
updateSuggestsCheckbox() {
|
||||
let urlbarSuggests = document.getElementById("urlBarSuggestion");
|
||||
urlbarSuggests.hidden =
|
||||
!Services.prefs.getBoolPref("browser.urlbar.unifiedcomplete");
|
||||
|
||||
let suggestsPref =
|
||||
document.getElementById("browser.search.suggest.enabled");
|
||||
let permanentPB =
|
||||
Services.prefs.getBoolPref("browser.privatebrowsing.autostart");
|
||||
urlbarSuggests.disabled = !suggestsPref.value || permanentPB;
|
||||
|
||||
let urlbarSuggestsPref =
|
||||
document.getElementById("browser.urlbar.suggest.searches");
|
||||
urlbarSuggests.checked = urlbarSuggestsPref.value;
|
||||
if (urlbarSuggests.disabled) {
|
||||
urlbarSuggests.checked = false;
|
||||
}
|
||||
suggestsPref.addEventListener("change", updateSuggestsCheckbox);
|
||||
updateSuggestsCheckbox();
|
||||
|
||||
let permanentPBLabel =
|
||||
document.getElementById("urlBarSuggestionPermanentPBLabel");
|
||||
permanentPBLabel.hidden = urlbarSuggests.hidden || !permanentPB;
|
||||
},
|
||||
|
||||
buildDefaultEngineDropDown: function() {
|
||||
|
|
|
@ -41,12 +41,15 @@
|
|||
label="&provideSearchSuggestions.label;"
|
||||
accesskey="&provideSearchSuggestions.accesskey;"
|
||||
preference="browser.search.suggest.enabled"/>
|
||||
<hbox class="indent">
|
||||
<vbox class="indent">
|
||||
<checkbox id="urlBarSuggestion" label="&showURLBarSuggestions.label;"
|
||||
hidden="true"
|
||||
accesskey="&showURLBarSuggestions.accesskey;"
|
||||
preference="browser.urlbar.suggest.searches"/>
|
||||
</hbox>
|
||||
<hbox id="urlBarSuggestionPermanentPBLabel"
|
||||
align="center" class="indent">
|
||||
<label flex="1">&urlBarSuggestionsPermanentPB.label;</label>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<checkbox id="redirectSearchCheckbox"
|
||||
label="&redirectWindowsSearch.label;"
|
||||
accesskey="&redirectWindowsSearch.accesskey;"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
<!ENTITY showURLBarSuggestions.label "Show search suggestions in location bar results">
|
||||
<!ENTITY showURLBarSuggestions.accesskey "l">
|
||||
<!ENTITY urlBarSuggestionsPermanentPB.label "Search suggestions will not be shown in location bar results because you have configured &brandShortName; to never remember history.">
|
||||
|
||||
<!ENTITY redirectWindowsSearch.label "Use this search engine for searches from Windows">
|
||||
<!ENTITY redirectWindowsSearch.accesskey "W">
|
||||
|
|
Загрузка…
Ссылка в новой задаче