| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus extension, | 2 * This file is part of the Adblock Plus extension, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 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/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 // TODO: These need to be defined properly | 18 // TODO: These need to be defined properly |
| 19 var window = this; |
| 19 function XMLHttpRequest() {}; | 20 function XMLHttpRequest() {}; |
| 20 var window = { | 21 function requestFileSystem() {}; |
| 21 requestFileSystem: function(){} | |
| 22 }; | |
| 23 | 22 |
| 24 // | 23 // |
| 25 // Module framework stuff | 24 // Module framework stuff |
| 26 // | 25 // |
| 27 | 26 |
| 28 function require(module) | 27 function require(module) |
| 29 { | 28 { |
| 30 return require.scopes[module]; | 29 return require.scopes[module]; |
| 31 } | 30 } |
| 32 require.scopes = {__proto__: null}; | 31 require.scopes = {__proto__: null}; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 callback: null, | 255 callback: null, |
| 257 initWithCallback: function(callback, delay) | 256 initWithCallback: function(callback, delay) |
| 258 { | 257 { |
| 259 this.callback = callback; | 258 this.callback = callback; |
| 260 this.delay = delay; | 259 this.delay = delay; |
| 261 this.scheduleTimeout(); | 260 this.scheduleTimeout(); |
| 262 }, | 261 }, |
| 263 scheduleTimeout: function() | 262 scheduleTimeout: function() |
| 264 { | 263 { |
| 265 var me = this; | 264 var me = this; |
| 266 window.setTimeout(function() | 265 setTimeout(function() |
| 267 { | 266 { |
| 268 try | 267 try |
| 269 { | 268 { |
| 270 me.callback(); | 269 me.callback(); |
| 271 } | 270 } |
| 272 catch(e) | 271 catch(e) |
| 273 { | 272 { |
| 274 Cu.reportError(e); | 273 Cu.reportError(e); |
| 275 } | 274 } |
| 276 me.scheduleTimeout(); | 275 me.scheduleTimeout(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 287 status: -1, | 286 status: -1, |
| 288 notificationCallbacks: {}, | 287 notificationCallbacks: {}, |
| 289 loadFlags: 0, | 288 loadFlags: 0, |
| 290 INHIBIT_CACHING: 0, | 289 INHIBIT_CACHING: 0, |
| 291 VALIDATE_ALWAYS: 0, | 290 VALIDATE_ALWAYS: 0, |
| 292 QueryInterface: function() | 291 QueryInterface: function() |
| 293 { | 292 { |
| 294 return this; | 293 return this; |
| 295 } | 294 } |
| 296 }; | 295 }; |
| OLD | NEW |