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 const Cu = Components.utils; | 6 const Cu = Components.utils; |
7 | 7 |
8 Cu.import("resource://gre/modules/AppConstants.jsm"); | 8 Cu.import("resource://gre/modules/AppConstants.jsm"); |
9 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); | 9 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); |
10 | 10 |
11 var modules = { | 11 var modules = { |
| 12 // Bringing back about: module |
| 13 // See https://issues.adblockplus.org/ticket/7211 |
| 14 "": { |
| 15 uri: "chrome://browser/content/aboutAdblockBrowser.xhtml", |
| 16 privileged: true |
| 17 }, |
| 18 |
12 fennec: { | 19 fennec: { |
13 uri: "chrome://browser/content/aboutAdblockBrowser.xhtml", | 20 uri: "chrome://browser/content/about.xhtml", |
14 privileged: true, | 21 privileged: true, |
15 hide: true | 22 hide: true |
16 }, | 23 }, |
17 | 24 |
18 // about:firefox is an alias for about:fennec, but not hidden from about:about | 25 // about:firefox is an alias for about:fennec, but not hidden from about:about |
19 get firefox() { | 26 get firefox() { |
20 return Object.assign({}, this.fennec, {hide: false}); | 27 return Object.assign({}, this.fennec, {hide: false}); |
21 }, | 28 }, |
22 | 29 |
23 // about:blank has some bad loading behavior we can avoid, if we use an alias | 30 // about:blank has some bad loading behavior we can avoid, if we use an alias |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 privileged: true | 74 privileged: true |
68 }, | 75 }, |
69 accounts: { | 76 accounts: { |
70 uri: "chrome://browser/content/aboutAccounts.xhtml", | 77 uri: "chrome://browser/content/aboutAccounts.xhtml", |
71 privileged: true | 78 privileged: true |
72 }, | 79 }, |
73 }; | 80 }; |
74 | 81 |
75 // Removing some about pages as part of | 82 // Removing some about pages as part of |
76 // https://issues.adblockplus.org/ticket/2531 | 83 // https://issues.adblockplus.org/ticket/2531 |
77 // Re-added feedback as part of https://issues.adblockplus.org/ticket/2930 | 84 // Adjusted some modules as part of |
78 for (let moduleName of ["firefox", "fennec", "rights", "apps"]) | 85 // https://issues.adblockplus.org/ticket/7211 |
| 86 for (let moduleName of ["fennec", "firefox", "rights", "accounts"]) |
79 delete modules[moduleName]; | 87 delete modules[moduleName]; |
80 | 88 |
81 function AboutRedirector() {} | 89 function AboutRedirector() {} |
82 AboutRedirector.prototype = { | 90 AboutRedirector.prototype = { |
83 QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]), | 91 QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]), |
84 classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"), | 92 classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"), |
85 | 93 |
86 _getModuleInfo: function(aURI) { | 94 _getModuleInfo: function(aURI) { |
87 let moduleName = aURI.pathQueryRef.replace(/[?#].*/, "").toLowerCase(); | 95 let moduleName = aURI.pathQueryRef.replace(/[?#].*/, "").toLowerCase(); |
88 return modules[moduleName]; | 96 return modules[moduleName]; |
(...skipping 27 matching lines...) Expand all Loading... |
116 } | 124 } |
117 | 125 |
118 channel.originalURI = aURI; | 126 channel.originalURI = aURI; |
119 | 127 |
120 return channel; | 128 return channel; |
121 } | 129 } |
122 }; | 130 }; |
123 | 131 |
124 const components = [AboutRedirector]; | 132 const components = [AboutRedirector]; |
125 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); | 133 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); |
OLD | NEW |