Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 safari.self.tab.dispatchMessage("loading", document.location.href); | |
Felix Dahlke
2013/11/15 13:28:38
Why not move this into the IIFE?
Sebastian Noack
2013/11/15 13:45:29
As you wish. I didn't put it into the IIFE in the
Felix Dahlke
2013/11/15 13:48:49
Oh, I actually meant "under" the IIFE (whether it'
| |
19 | |
18 (function() | 20 (function() |
19 { | 21 { |
20 /* Background page proxy */ | 22 /* Background page proxy */ |
21 var proxy = { | 23 var proxy = { |
22 objects: [], | 24 objects: [], |
23 callbacks: [], | 25 callbacks: [], |
24 | 26 |
25 send: function(message) | 27 send: function(message) |
26 { | 28 { |
27 var evt = document.createEvent("Event"); | 29 var evt = document.createEvent("Event"); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 ext.backgroundPage = { | 294 ext.backgroundPage = { |
293 _eventTarget: safari.self, | 295 _eventTarget: safari.self, |
294 _messageDispatcher: safari.self.tab, | 296 _messageDispatcher: safari.self.tab, |
295 | 297 |
296 sendMessage: sendMessage, | 298 sendMessage: sendMessage, |
297 getWindow: function() { return proxy.getObject(0); } | 299 getWindow: function() { return proxy.getObject(0); } |
298 }; | 300 }; |
299 | 301 |
300 ext.onMessage = new MessageEventTarget(safari.self); | 302 ext.onMessage = new MessageEventTarget(safari.self); |
301 })(); | 303 })(); |
OLD | NEW |