OLD | NEW |
1 /* | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * This file is part of the Adblock Plus build tools, | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 * | |
5 * Adblock Plus is free software: you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License version 3 as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * Adblock Plus is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | |
16 */ | |
17 | 4 |
18 const Cc = Components.classes; | 5 const Cc = Components.classes; |
19 const Ci = Components.interfaces; | 6 const Ci = Components.interfaces; |
20 const Cr = Components.results; | 7 const Cr = Components.results; |
21 const Cu = Components.utils; | 8 const Cu = Components.utils; |
22 | 9 |
23 let {Services, atob, btoa, File, TextDecoder, TextEncoder} = Cu.import("resource
://gre/modules/Services.jsm", null); | 10 let {Services, atob, btoa, File, TextDecoder, TextEncoder} = Cu.import("resource
://gre/modules/Services.jsm", null); |
24 | 11 |
25 {%- if hasXMLHttpRequest %} | 12 {%- if hasXMLHttpRequest %} |
26 let XMLHttpRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttpreque
st;1", "nsIXMLHttpRequest"); | 13 let XMLHttpRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttpreque
st;1", "nsIXMLHttpRequest"); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 { | 180 { |
194 if (topic == "{{metadata.get('general', 'basename')}}-require") | 181 if (topic == "{{metadata.get('general', 'basename')}}-require") |
195 { | 182 { |
196 subject.wrappedJSObject.exports = require(data); | 183 subject.wrappedJSObject.exports = require(data); |
197 } | 184 } |
198 }, | 185 }, |
199 | 186 |
200 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse
rver]) | 187 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse
rver]) |
201 }; | 188 }; |
202 {%- endif %} | 189 {%- endif %} |
OLD | NEW |