зеркало из https://github.com/mozilla/pjs.git
Bug 357321 don't blindly trust address book recipients when loading remote content - Remove unneeded code from privacy.js
p=me r/sr=mscott
This commit is contained in:
Родитель
49bfcbeaa8
Коммит
ccf16a21b7
|
@ -43,7 +43,6 @@ var gPrivacyPane = {
|
|||
init: function ()
|
||||
{
|
||||
this.mPane = document.getElementById("panePrivacy");
|
||||
this.updateRemoteImagesState();
|
||||
|
||||
this.updateManualMarkMode(document.getElementById('manualMark').checked);
|
||||
this.updateJunkLogButton(document.getElementById('enableJunkLogging').checked);
|
||||
|
@ -51,10 +50,6 @@ var gPrivacyPane = {
|
|||
// Update the MP buttons
|
||||
this.updateMasterPasswordButton();
|
||||
|
||||
// build the local address book menu list. We do this by hand instead of using the xul template
|
||||
// builder because of Bug #285076,
|
||||
this.createLocalDirectoriesList();
|
||||
|
||||
var preference = document.getElementById("mail.preferences.privacy.selectedTabIndex");
|
||||
if (preference.value)
|
||||
document.getElementById("privacyPrefs").selectedIndex = preference.value;
|
||||
|
@ -68,61 +63,6 @@ var gPrivacyPane = {
|
|||
.valueFromPreferences = document.getElementById("privacyPrefs").selectedIndex;
|
||||
},
|
||||
|
||||
createLocalDirectoriesList: function ()
|
||||
{
|
||||
var abPopup = document.getElementById("whitelist-menupopup");
|
||||
|
||||
if (abPopup)
|
||||
this.loadLocalDirectories(abPopup);
|
||||
},
|
||||
|
||||
loadLocalDirectories: function (aPopup)
|
||||
{
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"]
|
||||
.getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var parentDir = rdfService.GetResource("moz-abdirectory://").QueryInterface(Components.interfaces.nsIAbDirectory);
|
||||
var enumerator = parentDir.childNodes;
|
||||
var preference = document.getElementById("mailnews.message_display.disable_remote_images.whiteListAbURI");
|
||||
|
||||
if (enumerator)
|
||||
{
|
||||
while (enumerator.hasMoreElements())
|
||||
{
|
||||
var addrbook = enumerator.getNext();
|
||||
if (addrbook instanceof Components.interfaces.nsIAbDirectory && !addrbook.isRemote && !addrbook.isMailList)
|
||||
{
|
||||
var abURI = addrbook.directoryProperties.URI;
|
||||
item = document.createElement("menuitem");
|
||||
item.setAttribute("label", addrbook.dirName);
|
||||
item.setAttribute("value", abURI);
|
||||
aPopup.appendChild(item);
|
||||
if (preference.value == abURI)
|
||||
{
|
||||
aPopup.parentNode.value = abURI;
|
||||
aPopup.selectedItem = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
updateRemoteImagesState: function()
|
||||
{
|
||||
var checkbox = document.getElementById('networkImageDisableImagesInMailNews');
|
||||
|
||||
if (checkbox.checked)
|
||||
{
|
||||
document.getElementById('useWhiteList').removeAttribute('disabled');
|
||||
document.getElementById('whiteListAbURI').removeAttribute('disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('useWhiteList').setAttribute('disabled', 'true');
|
||||
document.getElementById('whiteListAbURI').setAttribute('disabled', 'true');
|
||||
}
|
||||
},
|
||||
|
||||
updateManualMarkMode: function(aEnableRadioGroup)
|
||||
{
|
||||
document.getElementById('manualMarkMode').disabled = !aEnableRadioGroup;
|
||||
|
|
Загрузка…
Ссылка в новой задаче