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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
331 { | 331 { |
332 sendMessage("pref", preference, Prefs[preference]); | 332 sendMessage("pref", preference, Prefs[preference]); |
333 }); | 333 }); |
334 } | 334 } |
335 } | 335 } |
336 }); | 336 }); |
337 | 337 |
338 port.on("prefs.set", (message, sender) => | 338 port.on("prefs.set", (message, sender) => |
339 { | 339 { |
340 if (message.key == "notifications_ignoredcategories") | 340 if (message.key == "notifications_ignoredcategories") |
341 return NotificationStorage.toggleIgnoreCategory("*", message.value); | 341 return NotificationStorage.toggleIgnoreCategory("*", !!message.value); |
342 | 342 |
343 return Prefs[message.key] = !Prefs[message.value]; | 343 return Prefs[message.key] = message.value; |
Manish Jethani
2017/10/09 15:02:55
Here you just mean to assign message.value.
kzar
2017/10/09 15:09:30
Whoops good catch, Done.
| |
344 }); | 344 }); |
345 | 345 |
346 port.on("prefs.toggle", (message, sender) => | 346 port.on("prefs.toggle", (message, sender) => |
347 { | 347 { |
348 if (message.key == "notifications_ignoredcategories") | 348 if (message.key == "notifications_ignoredcategories") |
349 return NotificationStorage.toggleIgnoreCategory("*"); | 349 return NotificationStorage.toggleIgnoreCategory("*"); |
350 | 350 |
351 return Prefs[message.key] = !Prefs[message.key]; | 351 return Prefs[message.key] = !Prefs[message.key]; |
352 }); | 352 }); |
353 | 353 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
437 if (message.url) | 437 if (message.url) |
438 subscriptions = [Subscription.fromURL(message.url)]; | 438 subscriptions = [Subscription.fromURL(message.url)]; |
439 | 439 |
440 for (let subscription of subscriptions) | 440 for (let subscription of subscriptions) |
441 { | 441 { |
442 if (subscription instanceof DownloadableSubscription) | 442 if (subscription instanceof DownloadableSubscription) |
443 Synchronizer.execute(subscription, true); | 443 Synchronizer.execute(subscription, true); |
444 } | 444 } |
445 }); | 445 }); |
446 })(this); | 446 })(this); |
LEFT | RIGHT |