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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 _wrapListener: function(listener) | 69 _wrapListener: function(listener) |
70 { | 70 { |
71 return function(event) | 71 return function(event) |
72 { | 72 { |
73 if (event.name.indexOf("request-") != 0) | 73 if (event.name.indexOf("request-") != 0) |
74 return; | 74 return; |
75 | 75 |
76 var sender = {}; | 76 var sender = {}; |
77 var dispatcher; | 77 var dispatcher; |
78 | 78 |
79 if ("SafariBrowserTab" in window && event.target instanceof SafariBrowse
rTab) | 79 if ("Tab" in window && "SafariBrowserTab" in window && event.target inst
anceof SafariBrowserTab) |
80 { | 80 { |
81 dispatcher = event.target.page; | 81 dispatcher = event.target.page; |
82 sender.tab = new Tab(event.target); | 82 sender.tab = new Tab(event.target); |
83 } | 83 } |
84 else | 84 else |
85 { | 85 { |
86 dispatcher = event.target.tab; | 86 dispatcher = event.target.tab; |
87 sender.tab = null; | 87 sender.tab = null; |
88 } | 88 } |
89 | 89 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 /* API */ | 220 /* API */ |
221 | 221 |
222 ext = { | 222 ext = { |
223 getURL: function(path) | 223 getURL: function(path) |
224 { | 224 { |
225 return safari.extension.baseURI + path; | 225 return safari.extension.baseURI + path; |
226 }, | 226 }, |
227 i18n: new I18n() | 227 i18n: new I18n() |
228 }; | 228 }; |
229 })(); | 229 })(); |
OLD | NEW |