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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 case "prefs.get": | 290 case "prefs.get": |
291 callback(Prefs[message.key]); | 291 callback(Prefs[message.key]); |
292 break; | 292 break; |
293 case "subscriptions.add": | 293 case "subscriptions.add": |
294 var subscription = Subscription.fromURL(message.url); | 294 var subscription = Subscription.fromURL(message.url); |
295 if ("title" in message) | 295 if ("title" in message) |
296 subscription.title = message.title; | 296 subscription.title = message.title; |
297 if ("homepage" in message) | 297 if ("homepage" in message) |
298 subscription.homepage = message.homepage; | 298 subscription.homepage = message.homepage; |
299 | 299 |
300 if (message.ask) | 300 if (message.confirm) |
Thomas Greiner
2016/03/18 10:48:20
Detail: Just a personal preference but what do you
Sebastian Noack
2016/03/18 11:35:07
Fine with me.
| |
301 { | 301 { |
302 ext.showOptions(onFilterChange.bind(null, "addSubscription", subscript ion)); | 302 ext.showOptions(function() |
Thomas Greiner
2016/03/18 10:48:20
Coding style: Mind the maximum line length.
Sebastian Noack
2016/03/18 11:35:07
Done.
| |
303 { | |
304 onFilterChange("addSubscription", subscription); | |
305 }); | |
303 } | 306 } |
304 else | 307 else |
305 { | 308 { |
306 subscription.disabled = false; | 309 subscription.disabled = false; |
307 FilterStorage.addSubscription(subscription); | 310 FilterStorage.addSubscription(subscription); |
308 | 311 |
309 if (subscription instanceof DownloadableSubscription && !subscription. lastDownload) | 312 if (subscription instanceof DownloadableSubscription && !subscription. lastDownload) |
310 Synchronizer.execute(subscription); | 313 Synchronizer.execute(subscription); |
311 } | 314 } |
312 break; | 315 break; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
366 if (subscription instanceof DownloadableSubscription) | 369 if (subscription instanceof DownloadableSubscription) |
367 Synchronizer.execute(subscription, true); | 370 Synchronizer.execute(subscription, true); |
368 } | 371 } |
369 break; | 372 break; |
370 case "subscriptions.isDownloading": | 373 case "subscriptions.isDownloading": |
371 callback(Synchronizer.isExecuting(message.url)); | 374 callback(Synchronizer.isExecuting(message.url)); |
372 break; | 375 break; |
373 } | 376 } |
374 }); | 377 }); |
375 })(this); | 378 })(this); |
LEFT | RIGHT |