mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Issue #991 Part 4: Network and URILoader
This commit is contained in:
parent
e2e42f0e1a
commit
3da26ba9e3
4 changed files with 9 additions and 35 deletions
|
|
@ -352,17 +352,11 @@ HandlerService.prototype = {
|
|||
var prefSvc = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService);
|
||||
var prefBranch = prefSvc.getBranch("network.protocol-handler.");
|
||||
try {
|
||||
alwaysAsk = prefBranch.getBoolPref("warn-external." + type);
|
||||
} catch (e) {
|
||||
// will throw if pref didn't exist.
|
||||
try {
|
||||
alwaysAsk = prefBranch.getBoolPref("warn-external-default");
|
||||
} catch (e) {
|
||||
// Nothing to tell us what to do, so be paranoid and prompt.
|
||||
alwaysAsk = true;
|
||||
}
|
||||
}
|
||||
// If neither of the prefs exists, be paranoid and prompt.
|
||||
alwaysAsk =
|
||||
prefBranch.getBoolPref("warn-external." + type,
|
||||
prefBranch.getBoolPref("warn-external-default",
|
||||
true));
|
||||
}
|
||||
aHandlerInfo.alwaysAskBeforeHandling = alwaysAsk;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue