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 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 179 |
180 var BackgroundMessageEventTarget = function() | 180 var BackgroundMessageEventTarget = function() |
181 { | 181 { |
182 MessageEventTarget.call(this); | 182 MessageEventTarget.call(this); |
183 } | 183 } |
184 BackgroundMessageEventTarget.prototype = { | 184 BackgroundMessageEventTarget.prototype = { |
185 __proto__: MessageEventTarget.prototype, | 185 __proto__: MessageEventTarget.prototype, |
186 _wrapSender: function(sender) | 186 _wrapSender: function(sender) |
187 { | 187 { |
188 var tab = new Tab(sender.tab); | 188 var tab = new Tab(sender.tab); |
| 189 if (sender.url == null); |
| 190 sender.url = tab.url; |
189 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})}; | 191 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})}; |
190 } | 192 } |
191 }; | 193 }; |
192 | 194 |
193 | 195 |
194 /* Tabs */ | 196 /* Tabs */ |
195 | 197 |
196 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest; | 198 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest; |
197 | 199 |
198 var BrowserAction = function(tabId) | 200 var BrowserAction = function(tabId) |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 if (isContextMenuHidden) | 575 if (isContextMenuHidden) |
574 return; | 576 return; |
575 | 577 |
576 chrome.contextMenus.removeAll(); | 578 chrome.contextMenus.removeAll(); |
577 isContextMenuHidden = true; | 579 isContextMenuHidden = true; |
578 } | 580 } |
579 }; | 581 }; |
580 | 582 |
581 ext.onMessage = new BackgroundMessageEventTarget(); | 583 ext.onMessage = new BackgroundMessageEventTarget(); |
582 })(); | 584 })(); |
OLD | NEW |