| 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 (function() | 18 (function() |
| 19 { | 19 { |
| 20 safari.self.tab.dispatchMessage("loading", document.location.href); |
| 21 |
| 22 |
| 20 /* Background page proxy */ | 23 /* Background page proxy */ |
| 21 var proxy = { | 24 var proxy = { |
| 22 objects: [], | 25 objects: [], |
| 23 callbacks: [], | 26 callbacks: [], |
| 24 | 27 |
| 25 send: function(message) | 28 send: function(message) |
| 26 { | 29 { |
| 27 var evt = document.createEvent("Event"); | 30 var evt = document.createEvent("Event"); |
| 28 evt.initEvent("beforeload"); | 31 evt.initEvent("beforeload"); |
| 29 return safari.self.tab.canLoad(evt, {type: "proxy", payload: message}); | 32 return safari.self.tab.canLoad(evt, {type: "proxy", payload: message}); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 ext.backgroundPage = { | 295 ext.backgroundPage = { |
| 293 _eventTarget: safari.self, | 296 _eventTarget: safari.self, |
| 294 _messageDispatcher: safari.self.tab, | 297 _messageDispatcher: safari.self.tab, |
| 295 | 298 |
| 296 sendMessage: sendMessage, | 299 sendMessage: sendMessage, |
| 297 getWindow: function() { return proxy.getObject(0); } | 300 getWindow: function() { return proxy.getObject(0); } |
| 298 }; | 301 }; |
| 299 | 302 |
| 300 ext.onMessage = new MessageEventTarget(safari.self); | 303 ext.onMessage = new MessageEventTarget(safari.self); |
| 301 })(); | 304 })(); |
| OLD | NEW |