|
|
Re: Mozilla - Back to Basics: Part 1 Firefox
(Score: 0)
by Anonymous on May 21, 2004 - 12:06 AM
|
|
You can do the same thing with Mozilla without having to edit nsHelperApp.js
|
Re: Mozilla - Back to Basics: Part 1 Firefox
(Score: 5, Interesting)
by Anonymous on Sep 14, 2004 - 02:50 PM
|
With FireFox PR1.0
// Initialize "always ask me" box. This should always be disabled
// and set to true for the ambiguous type application/octet-stream.
// We don't also check for application/x-msdownload here since we
// want users to be able to autodownload .exe files.
var rememberChoice = this.dialogElement("rememberChoice");
var mimeType = this.mLauncher.MIMEInfo.MIMEType;
//if (mimeType == "application/octet-stream" ||
// mimeType == "application/x-msdownload" ||
// this.mLauncher.targetFile.isExecutable()) {
// rememberChoice.checked = false;
// rememberChoice.disabled = true;
//}
//else {
rememberChoice.checked = !this.mLauncher.MIMEInfo.alwaysAskBeforeHandling;
//}
this.toggleRememberChoice(rememberChoice);
And don't forget:
// We don't let users open .exe files or random binary data directly
// from the browser at the moment because of security concerns.
var openWithDefaultOK = this.openWithDefaultOK();
var mimeType = this.mLauncher.MIMEInfo.MIMEType;
//if (this.mLauncher.targetFile.isExecutable() || (
// (mimeType == "application/octet-stream" ||
// mimeType == "application/x-msdownload") &&
// !openWithDefaultOK)) {
// this.dialogElement("open").disabled = true;
// var openHandler = this.dialogElement("openHandler");
// openHandler.disabled = true;
// openHandler.label = "";
// modeGroup.selectedItem = this.dialogElement("save");
// return;
//}
|
|