Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 | |
190 //url parameter is missing in sender object (Chrome v28 and below) | |
191 //It's a temporary fix ( http://codereview.adblockplus.org/453845842080563 2/ ) | |
Felix Dahlke
2014/02/27 20:45:25
I'd get rid of this line, doesn't add much. The fi
saroyanm
2014/02/28 12:47:15
Done.
| |
189 if (sender.url == null); | 192 if (sender.url == null); |
Thomas Greiner
2014/02/10 11:05:34
Add a comment above why this is necessary and inve
|
Felix Dahlke
2014/02/27 20:46:39
Actually, why check for null here? Isn't the url p
saroyanm
2014/02/28 12:47:15
Thanks for pointing.
|
190 sender.url = tab.url; | 193 sender.url = tab.url; |
191 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})}; | 194 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})}; |
192 } | 195 } |
193 }; | 196 }; |
194 | 197 |
195 | 198 |
196 /* Tabs */ | 199 /* Tabs */ |
197 | 200 |
198 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest; | 201 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest; |
199 | 202 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
575 if (isContextMenuHidden) | 578 if (isContextMenuHidden) |
576 return; | 579 return; |
577 | 580 |
578 chrome.contextMenus.removeAll(); | 581 chrome.contextMenus.removeAll(); |
579 isContextMenuHidden = true; | 582 isContextMenuHidden = true; |
580 } | 583 } |
581 }; | 584 }; |
582 | 585 |
583 ext.onMessage = new BackgroundMessageEventTarget(); | 586 ext.onMessage = new BackgroundMessageEventTarget(); |
584 })(); | 587 })(); |
LEFT | RIGHT |