mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 12:27:29 +09:00
Issue #1156 - Location Bar Preferences Checkboxes
Signed-off-by: Ryan Fox <flewkey@2a03.party>
This commit is contained in:
parent
b0cd49c0b8
commit
f921a47707
2 changed files with 0 additions and 33 deletions
|
|
@ -298,36 +298,6 @@ var gPrivacyPane = {
|
||||||
|
|
||||||
// HISTORY
|
// HISTORY
|
||||||
|
|
||||||
/**
|
|
||||||
* Read the location bar enabled and suggestion prefs
|
|
||||||
* @return Int value for suggestion menulist
|
|
||||||
*/
|
|
||||||
readSuggestionPref: function PPP_readSuggestionPref()
|
|
||||||
{
|
|
||||||
let getVal = function(aPref)
|
|
||||||
document.getElementById("browser.urlbar." + aPref).value;
|
|
||||||
|
|
||||||
// Suggest nothing if autocomplete is not enabled
|
|
||||||
if (!getVal("autocomplete.enabled"))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
// Bottom 2 bits of default.behavior specify history/bookmark
|
|
||||||
return getVal("default.behavior") & 3;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update browser.urlbar.autocomplete.enabled when a
|
|
||||||
* browser.urlbar.suggest.* pref is changed from the ui.
|
|
||||||
*/
|
|
||||||
writeSuggestionPref: function PPP_writeSuggestionPref() {
|
|
||||||
let getVal = (aPref) => {
|
|
||||||
return document.getElementById("browser.urlbar.suggest." + aPref).value;
|
|
||||||
}
|
|
||||||
// autocomplete.enabled is true if any of the suggestions is true
|
|
||||||
let enabled = ["history", "bookmark", "openpage"].map(getVal).some(v => v);
|
|
||||||
Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", enabled);
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Preferences:
|
* Preferences:
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -254,15 +254,12 @@
|
||||||
|
|
||||||
<vbox id="tabPrefsBox" align="start" flex="1">
|
<vbox id="tabPrefsBox" align="start" flex="1">
|
||||||
<checkbox id="historySuggestion" label="&locbar.history.label;"
|
<checkbox id="historySuggestion" label="&locbar.history.label;"
|
||||||
onsyncfrompreference="return gPrivacyPane.writeSuggestionPref();"
|
|
||||||
accesskey="&locbar.history.accesskey;"
|
accesskey="&locbar.history.accesskey;"
|
||||||
preference="browser.urlbar.suggest.history"/>
|
preference="browser.urlbar.suggest.history"/>
|
||||||
<checkbox id="bookmarkSuggestion" label="&locbar.bookmarks.label;"
|
<checkbox id="bookmarkSuggestion" label="&locbar.bookmarks.label;"
|
||||||
onsyncfrompreference="return gPrivacyPane.writeSuggestionPref();"
|
|
||||||
accesskey="&locbar.bookmarks.accesskey;"
|
accesskey="&locbar.bookmarks.accesskey;"
|
||||||
preference="browser.urlbar.suggest.bookmark"/>
|
preference="browser.urlbar.suggest.bookmark"/>
|
||||||
<checkbox id="openpageSuggestion" label="&locbar.openpage.label;"
|
<checkbox id="openpageSuggestion" label="&locbar.openpage.label;"
|
||||||
onsyncfrompreference="return gPrivacyPane.writeSuggestionPref();"
|
|
||||||
accesskey="&locbar.openpage.accesskey;"
|
accesskey="&locbar.openpage.accesskey;"
|
||||||
preference="browser.urlbar.suggest.openpage"/>
|
preference="browser.urlbar.suggest.openpage"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue