OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 const Cc = Components.classes; | 4 const Cc = Components.classes; |
5 const Ci = Components.interfaces; | 5 const Ci = Components.interfaces; |
6 | 6 |
7 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); | 7 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); |
8 | 8 |
9 let modules = { | 9 let modules = { |
10 // about: | 10 // about: |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 }, | 85 }, |
86 #endif | 86 #endif |
87 #ifdef NIGHTLY_BUILD | 87 #ifdef NIGHTLY_BUILD |
88 passwords: { | 88 passwords: { |
89 uri: "chrome://browser/content/aboutPasswords.xhtml", | 89 uri: "chrome://browser/content/aboutPasswords.xhtml", |
90 privileged: true | 90 privileged: true |
91 } | 91 } |
92 #endif | 92 #endif |
93 } | 93 } |
94 | 94 |
| 95 // Removing some about pages as part of |
| 96 // https://issues.adblockplus.org/ticket/2531 |
| 97 for (let moduleName of ["firefox", "fennec", "rights", "apps", "feedback"]) |
| 98 delete modules[moduleName]; |
| 99 |
95 function AboutRedirector() {} | 100 function AboutRedirector() {} |
96 AboutRedirector.prototype = { | 101 AboutRedirector.prototype = { |
97 QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]), | 102 QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]), |
98 classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"), | 103 classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"), |
99 | 104 |
100 _getModuleInfo: function (aURI) { | 105 _getModuleInfo: function (aURI) { |
101 let moduleName = aURI.path.replace(/[?#].*/, "").toLowerCase(); | 106 let moduleName = aURI.path.replace(/[?#].*/, "").toLowerCase(); |
102 return modules[moduleName]; | 107 return modules[moduleName]; |
103 }, | 108 }, |
104 | 109 |
(...skipping 25 matching lines...) Expand all Loading... |
130 } | 135 } |
131 | 136 |
132 channel.originalURI = aURI; | 137 channel.originalURI = aURI; |
133 | 138 |
134 return channel; | 139 return channel; |
135 } | 140 } |
136 }; | 141 }; |
137 | 142 |
138 const components = [AboutRedirector]; | 143 const components = [AboutRedirector]; |
139 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); | 144 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); |
OLD | NEW |