2007-12-12 08:36:32 -06:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Automatically set browser preferences</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<form action="undefined" method="get">
|
|
|
|
<input type=button onclick="setPreferences()" name="prefs" value="Configure Firefox">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2011-02-17 10:51:03 -06:00
|
|
|
function setPreferences() {
|
|
|
|
if (typeof navigator.preference == 'undefined') {
|
|
|
|
// From Firefox 4 and SeaMonkey 2.1, navigator.preference intefrace is dropped
|
|
|
|
// Use new Gecko2 Services.jsm JavaScript code module instead.
|
|
|
|
var privilege = 'UniversalXPConnect';
|
|
|
|
netscape.security.PrivilegeManager.enablePrivilege(privilege);
|
|
|
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
|
|
|
var prefFuncChar = function(par, val) {Services.prefs.setCharPref(par, val)};
|
|
|
|
var prefFuncBool = function(par, val) {Services.prefs.setBoolPref(par, val)};
|
|
|
|
} else {
|
|
|
|
var privilege = 'UniversalPreferencesWrite';
|
|
|
|
netscape.security.PrivilegeManager.enablePrivilege(privilege);
|
|
|
|
var prefFuncChar = function(par, val) {navigator.preference(par, val)};
|
|
|
|
var prefFuncBool = prefFuncChar; // same function for bool and char
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
2007-12-12 08:36:32 -06:00
|
|
|
try {
|
2011-02-17 10:51:03 -06:00
|
|
|
prefFuncBool('network.negotiate-auth.using-native-gsslib', true);
|
|
|
|
prefFuncChar('network.negotiate-auth.delegation-uris', '.$DOMAIN');
|
|
|
|
prefFuncChar('network.negotiate-auth.trusted-uris', '.$DOMAIN');
|
|
|
|
prefFuncBool('network.negotiate-auth.allow-proxies', true);
|
2007-12-12 08:36:32 -06:00
|
|
|
} catch (e) {
|
2011-02-17 10:51:03 -06:00
|
|
|
alert("Unable to store preferences: " + e);
|
|
|
|
return;
|
2007-12-12 08:36:32 -06:00
|
|
|
}
|
2011-02-17 10:51:03 -06:00
|
|
|
|
|
|
|
netscape.security.PrivilegeManager.disablePrivilege(privilege);
|
|
|
|
|
|
|
|
alert("Successfully configured Firefox for single sign-on.");
|
2007-12-12 08:36:32 -06:00
|
|
|
} catch (e) {
|
2011-02-17 10:51:03 -06:00
|
|
|
alert("Unable to apply recommended settings.\n\n" +
|
|
|
|
"Click on the Certificate Authority link and select trust for all, " +
|
|
|
|
"then reload this page and try again.\n\nThe error returned was: " + e);
|
2007-12-12 08:36:32 -06:00
|
|
|
return;
|
2011-02-17 10:51:03 -06:00
|
|
|
}
|
2007-12-12 08:36:32 -06:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|