mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-10 01:40:17 +01:00
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
|
function Startup()
|
||
|
{
|
||
|
var startupFunc;
|
||
|
try {
|
||
|
startupFunc = document.getElementById("mailnewsEnableMapi").getAttribute('startupFunc');
|
||
|
}
|
||
|
catch (ex) {
|
||
|
startupFunc = null;
|
||
|
}
|
||
|
if (startupFunc)
|
||
|
eval(startupFunc);
|
||
|
|
||
|
StartPageCheck();
|
||
|
}
|
||
|
|
||
|
function StartPageCheck()
|
||
|
{
|
||
|
var checked = document.getElementById("mailnewsStartPageEnabled").checked;
|
||
|
var startPageLocked = parent.hPrefWindow.getPrefIsLocked("mailnews.start_page.url");
|
||
|
document.getElementById("mailnewsStartPageUrl").disabled = !checked || startPageLocked;
|
||
|
}
|
||
|
|
||
|
function setHomePageToDefaultPage(folderFieldId)
|
||
|
{
|
||
|
var homePageField = document.getElementById(folderFieldId);
|
||
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||
|
.getService(Components.interfaces.nsIPrefService);
|
||
|
var prefs = prefService.getDefaultBranch(null);
|
||
|
var url = prefs.getComplexValue("mailnews.start_page.url",
|
||
|
Components.interfaces.nsIPrefLocalizedString).data;
|
||
|
homePageField.value = url;
|
||
|
}
|
||
|
|