| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 { | 347 { |
| 348 let notification = getActiveNotification(); | 348 let notification = getActiveNotification(); |
| 349 | 349 |
| 350 if (!notification || | 350 if (!notification || |
| 351 "displayMethod" in message && | 351 "displayMethod" in message && |
| 352 !shouldDisplay(message.displayMethod, notification.type)) | 352 !shouldDisplay(message.displayMethod, notification.type)) |
| 353 return; | 353 return; |
| 354 | 354 |
| 355 let texts = NotificationStorage.getLocalizedTexts(notification, | 355 let texts = NotificationStorage.getLocalizedTexts(notification, |
| 356 message.locale); | 356 message.locale); |
| 357 return Object.assign({}, notification, {texts}); | 357 return Object.assign({texts}, notification); |
|
Thomas Greiner
2017/10/09 10:52:59
Detail: The third argument is redundant because yo
kzar
2017/10/09 11:13:51
Good point, Done.
| |
| 358 }); | 358 }); |
| 359 | 359 |
| 360 port.on("subscriptions.add", (message, sender) => | 360 port.on("subscriptions.add", (message, sender) => |
| 361 { | 361 { |
| 362 let subscription = Subscription.fromURL(message.url); | 362 let subscription = Subscription.fromURL(message.url); |
| 363 if (message.confirm) | 363 if (message.confirm) |
| 364 { | 364 { |
| 365 if ("title" in message) | 365 if ("title" in message) |
| 366 subscription.title = message.title; | 366 subscription.title = message.title; |
| 367 if ("homepage" in message) | 367 if ("homepage" in message) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 if (message.url) | 429 if (message.url) |
| 430 subscriptions = [Subscription.fromURL(message.url)]; | 430 subscriptions = [Subscription.fromURL(message.url)]; |
| 431 | 431 |
| 432 for (let subscription of subscriptions) | 432 for (let subscription of subscriptions) |
| 433 { | 433 { |
| 434 if (subscription instanceof DownloadableSubscription) | 434 if (subscription instanceof DownloadableSubscription) |
| 435 Synchronizer.execute(subscription, true); | 435 Synchronizer.execute(subscription, true); |
| 436 } | 436 } |
| 437 }); | 437 }); |
| 438 })(this); | 438 })(this); |
| LEFT | RIGHT |