Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 { | 150 { |
151 if (message.what == "issues") | 151 if (message.what == "issues") |
152 { | 152 { |
153 let subscriptionInit = require("subscriptionInit"); | 153 let subscriptionInit = require("subscriptionInit"); |
154 let result = subscriptionInit ? subscriptionInit.reinitialized : false; | 154 let result = subscriptionInit ? subscriptionInit.reinitialized : false; |
155 return {filterlistsReinitialized: result}; | 155 return {filterlistsReinitialized: result}; |
156 } | 156 } |
157 | 157 |
158 if (message.what == "doclink") | 158 if (message.what == "doclink") |
159 { | 159 { |
160 let {application, platform} = info; | 160 let {application} = info; |
Sebastian Noack
2017/09/25 21:03:22
Nit: I personally wouldn't assign "platform" to a
saroyanm
2017/09/25 21:21:45
Done.
| |
161 if (platform == "chromium" && application != "opera") | 161 if (info.platform == "chromium" && application != "opera") |
162 application = "chrome"; | 162 application = "chrome"; |
163 else if (platform == "gecko") | 163 else if (info.platform == "gecko") |
164 application = "firefox"; | 164 application = "firefox"; |
165 | 165 |
166 let link = message.link.replace("{application}", application); | 166 return Utils.getDocLink(message.link.replace("{browser}", application)); |
167 return Utils.getDocLink(link); | |
Sebastian Noack
2017/09/25 21:03:22
Nit: Why a temporary variable, and not just return
saroyanm
2017/09/25 21:17:33
Exceeded 80 char limit.
saroyanm
2017/09/25 21:28:00
Done.
| |
168 } | 167 } |
169 | 168 |
170 if (message.what == "localeInfo") | 169 if (message.what == "localeInfo") |
171 { | 170 { |
172 let bidiDir; | 171 let bidiDir; |
173 if ("chromeRegistry" in Utils) | 172 if ("chromeRegistry" in Utils) |
174 { | 173 { |
175 let isRtl = Utils.chromeRegistry.isLocaleRTL("adblockplus"); | 174 let isRtl = Utils.chromeRegistry.isLocaleRTL("adblockplus"); |
176 bidiDir = isRtl ? "rtl" : "ltr"; | 175 bidiDir = isRtl ? "rtl" : "ltr"; |
177 } | 176 } |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
434 if (message.url) | 433 if (message.url) |
435 subscriptions = [Subscription.fromURL(message.url)]; | 434 subscriptions = [Subscription.fromURL(message.url)]; |
436 | 435 |
437 for (let subscription of subscriptions) | 436 for (let subscription of subscriptions) |
438 { | 437 { |
439 if (subscription instanceof DownloadableSubscription) | 438 if (subscription instanceof DownloadableSubscription) |
440 Synchronizer.execute(subscription, true); | 439 Synchronizer.execute(subscription, true); |
441 } | 440 } |
442 }); | 441 }); |
443 })(this); | 442 })(this); |
LEFT | RIGHT |